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

Find a way to accelerate creating a keyed hasher #2

Closed
tkaitchuck opened this issue Feb 28, 2019 · 1 comment
Closed

Find a way to accelerate creating a keyed hasher #2

tkaitchuck opened this issue Feb 28, 2019 · 1 comment

Comments

@tkaitchuck
Copy link
Owner

Generating two random numbers each time a hasher is created is a high overhead.
Rust's default approach is to use the thread local storage to generate a random value and then for each subsequent hasher increment the number.
This is not ideal, because it means if you learn one seed you learn them all, it also requires a hash map lookup each time you want to instantiate a hash map. (Which is not a big deal if that were fast, but right now that involves SipHash which is MUCH slower.)

@tkaitchuck
Copy link
Owner Author

This is partially resolved with LocationBasedState.

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

1 participant