Closed svladykin closed 3 years ago
I see that hashLong rotates input on Big Endian platforms with Primitives.nativeToLittleEndian:
hashLong
Primitives.nativeToLittleEndian
https://github.com/OpenHFT/Zero-Allocation-Hashing/blob/303f1a5dba00af1f5482b68e5f3884924bdfe620/src/main/java/net/openhft/hashing/XxHash.java#L155
Do I understand correct that hashLong(1L) will not return the same result on Big and Little Endian platforms?
hashLong(1L)
The portability is defined by the hash algorithm, here your example xxhash, not by the interface hashLong(). You can also find the portability description in the javadoc of zah for every implemented hash algorithms.
hashLong()
I see that
hashLong
rotates input on Big Endian platforms withPrimitives.nativeToLittleEndian
:https://github.com/OpenHFT/Zero-Allocation-Hashing/blob/303f1a5dba00af1f5482b68e5f3884924bdfe620/src/main/java/net/openhft/hashing/XxHash.java#L155
Do I understand correct that
hashLong(1L)
will not return the same result on Big and Little Endian platforms?