jpountz commented on a change in pull request #430: URL: https://github.com/apache/lucene/pull/430#discussion_r749462492
########## File path: lucene/core/src/java/org/apache/lucene/util/IntroSelector.java ########## @@ -185,6 +204,115 @@ private void shuffle(int from, int to) { } } + /** Selects the k-th entry with a bottom-k algorithm, given that k is close to {@code from}. */ Review comment: Interesting. When I raised this question, I had more in mind borrowing ideas from interpolation search (https://en.wikipedia.org/wiki/Binary_search_algorithm#Interpolation_search) and e.g. see if picking the lowest of the 3 medians when `k-from < (to - from) / 8` and the highest of the 3 medians when `to-k < (to - from) / 8)` makes things any faster. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org