micro optimizations for KNN