Suppose we have two sets of points A, B, and we want to find for every point in set A its nearest neighbor in set B.
There are many good algorithms to find the near
You may benefit from reading bentleys "writing efficient programs" where he deals with a case study of the traveling salesman program. One of the savings that he recognized was that the distince between two points involved taking a square root which was expensive. Taking the square root gives you the actual distance, not taking the square root gives you a number which can be used to compare against other relative values.
I highly recommend reading the book. It will put your brain in the right place.