mkaravel commented on code in PR #50338: URL: https://github.com/apache/spark/pull/50338#discussion_r2008375118
########## common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java: ########## @@ -171,7 +171,7 @@ public static byte[] concatWS(byte[] delimiter, byte[]... inputs) { // Allocate a new byte array, and copy the inputs one by one into it final byte[] result = new byte[Ints.checkedCast(totalLength)]; int offset = 0; - for (int i = 0; i < inputs.length; i++) { + for (int i = 0; i < inputs.length; ++i) { Review Comment: Coming from the C++ world where there is a big difference between `it++` and `++it` when `it` is an iterator, this is one of the things that stand out to me all the time. For integers it should not make any difference, and I can easily believe that is appropriately optimized in Java. The difference in general is that `++it` does not need to create a new integer, whereas `it++` needs to (to preserve and return the original value). -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org