-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hash64 generate different value as other language implements #51
Comments
Did you see https://github.com/lovell/farmhash?tab=readme-ov-file#hash ?
WebAssembly provides what is essentially a virtual CPU so the hash-based methods will produce a different result from an implementation that can take advantage of SIMD features of a physical CPU. If you need consistency, please use the fingerprint-based methods.
https://github.com/lovell/farmhash?tab=readme-ov-file#fingerprint |
well...that might be... both projects use cc source code for lib implementation and imo, these cc files are almost same. |
OK. I got a problem. first in my case, a input string lengthis 3 ( main logic is really same when a length is too small. but still node version call makes differents values. a main problem is, last step.
and also (unlike python building), node-gyp never set so, default suggestiong is correct. differenct cpu can makes different result.
after the patch, result makes same result :) |
a last step of the hash functions runs one more swap if activated debug mode. this debug flags makes slow down the processing speed and it also always makes different result as fingerprint. close lovell#51
Ah, great spot about the (lack of) |
a last step of the hash functions runs one more swap if activated debug mode. this debug flags makes slow down the processing speed and it also always makes different result as fingerprint. close lovell#51
similar #27
hash32/64 families generated wrong value (idk reason fingerprint family generated correct value)
for example
python
farmhash-modern
but farmhash
is it bug or do i miss something?
The text was updated successfully, but these errors were encountered: