-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add rustc-hash to the bench? #85
Comments
One of the reasons why such hash is not included in the benchmarks is because of its very poor quality (very bad avalanche and distribution properties). Like FNV-1a (it's a pretty similar algorithm) it does not pass most of the tests of quality benches, such as smhasher for instance. That said, FNV-1a has been included in the benchs because of how common it is, so maybe we can do the same with FxHash. I ran a bench on my MacBook pro and here are the results:
In this repository there is a bench to test quality over a few criteria, here is the output for gxhash / fxhash:
|
FYI rustc-hash version 2 was released which ships a different implementation (rust-lang/rustc-hash#37) |
The test suite is nowhere nearly a good as smhasher's one but this new version rustc_hash is much more robust and passes all quality tests in this repository 👍
Regarding performance, the finalization made it a little slower than it was in its previous version for tiny inputs but it performs much better for larger inputs. On my ARM laptop it performs as good as gxhash for up to 32 bytes inputs (which is already substantial!) with the added benefit of better portability given the current state of simd in rust.
|
https://crates.io/crates/rustc-hash
The text was updated successfully, but these errors were encountered: