original-brownbear commented on code in PR #13936: URL: https://github.com/apache/lucene/pull/13936#discussion_r1807873638
########## lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java: ########## @@ -270,7 +280,7 @@ public final boolean remove(T element) { return false; } - private final boolean upHeap(int origPos) { + private boolean upHeap(int origPos, T[] heap) { Review Comment: > although I think assigning to a local variable within the method would yield the same result Not quite, the idea was that I already have `heap` in a local in the caller, so if I pass it as an argument I save a field read and as an added bonus get a smaller method that inlines better. -- 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