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

ahash shouldn't be the default Hasher #473

Open
jedisct1 opened this issue Oct 18, 2023 · 3 comments
Open

ahash shouldn't be the default Hasher #473

jedisct1 opened this issue Oct 18, 2023 · 3 comments

Comments

@jedisct1
Copy link

See tkaitchuck/aHash#163

It's also currently completely broken on ARM: tkaitchuck/aHash#166

@Amanieu
Copy link
Member

Amanieu commented Oct 18, 2023

Hashbrown specifically doesn't make any guarantees about hash function security. The only reason we don't use FxHash by default is because it gives poor results if the input values are all multiples of the same value (e.g. all multiples of 4).

@jestarray
Copy link

Curious, what is the best hasher if one only cares about perf?

@thomcc
Copy link
Member

thomcc commented Oct 27, 2023

It's an unanswerable question. You can make an arbitrarily fast hasher by reducing the quality of the output. For example, only hash the first 16 bytes of input strings, or even just return a constant value. Both of those are legal Hasher implementations.

bors added a commit that referenced this issue Oct 27, 2023
bump ahash version 0.8.0 -> 0.8.6

ahash 0.8.0 was yanked.

should also fix the issues mentioned in [hashbrown/issues/473](#473)

I think I ran all the necessary tests so let me know if I need to do more.
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

4 participants