Speed up get_particles_by_resolution.