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

Consider switching to foldhash #1872

Open
Centril opened this issue Oct 17, 2024 · 1 comment
Open

Consider switching to foldhash #1872

Centril opened this issue Oct 17, 2024 · 1 comment

Comments

@Centril
Copy link
Contributor

Centril commented Oct 17, 2024

Hashbrown recently switched to foldhash instead of ahash and maybe we should as well.

Perhaps we should split our hashmap/sets into 3 categories:

  1. IntMap/Set -- identity hashing, when we don't need a hash at all, in the case of ids.
  2. FastMap/Set -- using foldhash-f when we don't care about Hash DoS, e.g., when the data comes from the DB state and not from user input.
  3. ResistMap/Set -- using foldhash-q or some other hasher like siphash.

This could gain us some performance wins.

@Centril
Copy link
Contributor Author

Centril commented Oct 17, 2024

Putting this in 1.0 because I don't know whether we rely on ahash anywhere, in the sense that changing to foldhash would break things, but we can move it out if we realize we don't.

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

No branches or pull requests

1 participant