jpountz commented on a change in pull request #966: LUCENE-9024 Optimize
IntroSelector to use median of medians
URL: https://github.com/apache/lucene-solr/pull/966#discussion_r339307490
##########
File path: lucene/core/src/java/org/apache/lucene/util/IntroSelector.java
##########
@@ -36,29 +36,30 @@ int slowSelect(int from, int to, int k) {
return medianOfMediansSelect(from, to-1, k);
}
- int medianOfMediansSelect(int from, int to, int k) {
+ int medianOfMediansSelect(int left, int right, int k) {
int pivotIndex;
Review comment:
it seems that we could reduce the scope of pivotIndex by moving it inside of
the do..while loop. I know it's used in the return statement, but we could
equally return left or right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]