Skip to content
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

benchmark with fxhash #61

Closed
godofdream opened this issue Jun 20, 2022 · 2 comments
Closed

benchmark with fxhash #61

godofdream opened this issue Jun 20, 2022 · 2 comments

Comments

@godofdream
Copy link

ramhorns uses fnvhash as default, however the hasher is interchangeable.
Could you add a benchmark with https://github.com/cbreeden/fxhash ?
you have mentioned fxhash as faster alternative in https://maciej.codes/2019-03-03-ramhorns.html

@maciejhirsz
Copy link
Owner

ramhorns uses fnvhash as default, however the hasher is interchangeable.

You can only change the hasher used for internal hashmap that handles partials. All regular variable injection is hardcoded to fnv, and there is no way to change it with generics since the hash has to match the output of the derive macro.

FxHash produces collisions on English word dictionaries, where as 64bit fnv does not, so any performance gains there would be void if we had to compare strings by value to get rid of collisions.

@godofdream
Copy link
Author

I was able to reproduce hash collisions with fxhash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants