stefanvodita commented on code in PR #12947: URL: https://github.com/apache/lucene/pull/12947#discussion_r1639869649
########## lucene/core/src/java/org/apache/lucene/util/LSBRadixSorter.java: ########## @@ -92,7 +92,7 @@ public void sort(int numBits, final int[] array, int len) { return; } - buffer = ArrayUtil.grow(buffer, len); + buffer = ArrayUtil.growNoCopy(buffer, len); Review Comment: I think the idea is that we expect an application to call this method multiple times. As an optimisation, we keep a buffer allocated instead of reallocating every time the method is called. `buffer` is a permanent reference to that buffer. `buf` is a temporary one, which we might lose when we swap arrays below. -- 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