optimized particle_equal

It was spending 7.5% of the time in this function.