Yes, this is called at the prediction/query, though only if the `sort_results` keyword is True.  I think the reason this is faster is because the constant in the O[n] indexing operations is larger than the constant in front of the O[n log n] swaps.  I only benchmarked it for ~1-100 neighbors, which is typical for k neighbors queries.