rust-farmhash
rust-farmhash copied to clipboard
Why can hash value vary by library version and platform?
Hello,
I was wondering why it is the case that the "hash value may vary with library version and platform" as written in the API docs for the hash32() function? I looked at that function, and it just seems to be a bunch of operations (bit shift, mult, rotate, etc) being done on the item being hashed, but none of that should be platform specific. So why is the hash value not deterministic?
Thanks
@rigdent on certain platforms vector shift and rotate can be endian-sensitive. See: https://stackoverflow.com/a/7184905/1080804