Nearest point index perf work part 2

By splitting apart the math, we cut down on method calls and multiplication inside a tight loop. This one is a little bit more contentious and I won't cry if you reject it out of hand but it does win me an additional 10% perf boost  (on top of my previous pull request.)