jpountz commented on a change in pull request #91: URL: https://github.com/apache/lucene/pull/91#discussion_r629124298
########## File path: lucene/core/src/java/org/apache/lucene/codecs/MutablePointValues.java ########## @@ -41,4 +41,10 @@ protected MutablePointValues() {} /** Swap the i-th and j-th values. */ public abstract void swap(int i, int j); + + /** Assign the from-th value to to-th position in another array which used temporarily. */ + public abstract void assign(int from, int to); + + /** Finalize assign operation, to switch array. */ + public abstract void finalizeAssign(int from, int to); Review comment: Sorry I was probably not clear. My point was that the current implementation does this: - reorder from the main array into a temporary array - copy the content of the temporary array back into the main array I'm suggesting doing this instead: - copy the content of the main array into the temporary array - reorder from the temporary array into the main array I don't think it should make any different in terms of performance, the only benefit I'm seeing is that it would allow us to have a more consistent API with TimSorter. What do you think? -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org