not to optimize the Y sort to reduce compute time, but it use more heap memory to find nearest point