-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Questions about MurmurHash and FNV #251
Comments
Code length is rarely a factor. Branching or the number of "pivot points" to reach the result matters most in hash functions. |
Code length is a huge factor in most use cases. Esp. Hash tables. |
Thanks for answering! I actually figured that one out, I missed the fact that MurmurHash3 hashes more bits each time than FNV. But I still don't understand how all these test results were all significantly faster than my implementation (which is my first question). |
Have you actually did any comparisons of attribute |
Hi all, I have a couple of noob questions that I hope someone could answer:
Benchmarks on this GitHub page show that MurmurHash3 runs at over 3000 MB/s, while my implementation can only reach 40 MB/s. When I did some calculations, my number seems reasonable given that a 3GHz processor can only run 3*10^9 cycles per second, which translates to roughly 60 MB/s assuming that each hash takes around 50 cycles (as stated on the GitHub page). How are hash functions able to achieve such high speeds? Are there any compiler optimizations that could be contributing to this performance?
In my tests, I have found that MurmurHash3 is significantly slower than FNV1a (40MB/s vs 80MB/s). However, according to the benchmarks, MurmurHash is 4 times as fast as FNV. How is this the case, as it appears that MurmurHash3 have lengthier code and more instructions than FNV1a.
I would greatly appreciate it if someone could answer my questions!
The text was updated successfully, but these errors were encountered: