srowen commented on a change in pull request #29762:
URL: https://github.com/apache/spark/pull/29762#discussion_r489756761
##########
File path:
common/sketch/src/main/java/org/apache/spark/util/sketch/Murmur3_x86_32.java
##########
@@ -92,8 +96,10 @@ private static int hashBytesByInt(Object base, long offset,
int lengthInBytes, i
int h1 = seed;
for (int i = 0; i < lengthInBytes; i += 4) {
int halfWord = Platform.getInt(base, offset + i);
- int k1 = mixK1(halfWord);
- h1 = mixH1(h1, k1);
+ if (isBigEndian) {
Review comment:
I am not sure how much difference it makes, but this condition is of
course checked every time in the loop.
If one were willing to duplicate the loop, you could check it once at the
outset. But unless there's evidence that is non-trivial overhead and that this
is a very hot loop, probably the extra branch is negligible, esp. if it is
smart enough to know it's always false/true.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]