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

Replace Ahash with Fnv for Hashbrown #825

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shamatar
Copy link

@shamatar shamatar commented May 1, 2024

Alternative to #824 , will fix #812 too for systems without atomics. Fnv provides no key randomization, but it shouldn't be required for commitment scheme.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@shamatar shamatar requested review from a team as code owners May 1, 2024 12:22
@shamatar shamatar requested review from Pratyush, mmagician and weikengchen and removed request for a team May 1, 2024 12:22
@Pratyush
Copy link
Member

How about we use SipHash for non-atomic platforms, and ahash elsewhere?

@shamatar
Copy link
Author

To be honest I'm not sure from top of my head if I can make cargo dependency optional based on whether a platform has atomics. Will try

@shamatar
Copy link
Author

Another question is whether or not try to include aHash with or without randomization if it's done as external dependency instead of default hash in hashbrown. Hashbrown itself doesn't have and option to continue aHash's features, but maybe it can be imported independently and without randomization is may have no atomics by itself

@Pratyush
Copy link
Member

To be honest I'm not sure from top of my head if I can make cargo dependency optional based on whether a platform has atomics. Will try

I think it's possible like so: https://github.com/PyO3/pyo3/blob/fe79f548174eb8108813f202bb0df9428ddfd806/Cargo.toml#L48

@shamatar
Copy link
Author

restored features (inlines) on hashbrown + ahash is used on platforms with atomics

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

Successfully merging this pull request may close these issues.

Ark-ec pulls in full hashbrown without feature gate
2 participants