Test between Legion and OpenMP implementations of a simple particle method to reach comparable performance