bruno-roustant commented on pull request #430: URL: https://github.com/apache/lucene/pull/430#issuecomment-968155694
After the question about k close to from or last, I tried to find a way to speed up in those cases, and it is actually possible. I used what I called bottom-k or top-k selection. I speeds up efficiently (x4) when (k - from <= 20) or (last - k <= 20). But we can also use it inside the quick selection loop. Anytime k becomes close to either from or last, and the current range is not too small, we can finish with a top-k selection. It gives a global additional +10% perf gain on all data shapes! This time I think I'm done optimizing. -- 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