Github user kiszk commented on the issue:
https://github.com/apache/spark/pull/22338
In addition to [your
commit](https://github.com/apache/spark/pull/22338/commits/91adce590461dda885d88319a700a775e63f9ce6),
I applied the following change, basically use `MemoryBlock` in
`hashBytesByIntBlock()`. I got 33us.
```
private static int hashBytesByIntBlock(MemoryBlock base, int
lengthInBytes, int seed) {
assert (lengthInBytes % 4 == 0);
int h1 = seed;
for (int i = 0; i < lengthInBytes; i += 4) {
int halfWord = base.getInt(i);
int k1 = mixK1(halfWord);
h1 = mixH1(h1, k1);
}
return h1;
}
```
But, furthermore, when I also used `MemoryBlock` in
`hashUnsafeBytesBlock()`, I got 111us.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]