Direct methods using numerical integration require on the order of ⁠ 1 / 2 ⁠ n computations to evaluate the potential energy over all pairs of particles, and thus have a time complexity of O (n). For simulations with many particles, the O (n) factor makes large-scale calculations especially time-consuming.