How to find the distance between two actors don't use get locations?

Hello, everyone. i am doing gravity simulation. many actors are attracted to each other, each determines the distance to all others through get location. but the more objects the more FPS falls. Get location every tick is very expensive for the CPU. How can vector fields be used? how to use Radial Vector in field category? or Radial Falloff? can’t find any documentation.