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

Use rustc-hash instead of fxhash #710

Open
0xbe7a opened this issue Jun 1, 2024 · 2 comments
Open

Use rustc-hash instead of fxhash #710

0xbe7a opened this issue Jun 1, 2024 · 2 comments

Comments

@0xbe7a
Copy link
Contributor

0xbe7a commented Jun 1, 2024

Some data types in Rattler, like rattler_conda_types::RepoData, use FxHashMap instead of HashMap for better performance. This implementation utilizes fxhash, which employs a simpler hash function compared to the default one from std. fxhash was originally extracted from rustc, and since then, rustc-hash has been created and is maintained by rust-lang.

fxhash has not seen a release in seven years, and the last commit was five years ago. In contrast, rustc-hash is under active maintenance.

The author himself recommends using rustc-hash instead, as stated in cbreeden/fxhash#10. As downstream users of this library have to interact with FxHashMaps, I think it would make sense to switch over to rustc-hash to avoid forcing people to depend on outdated crates and use the more popular crate instead.

@baszalmstra
Copy link
Collaborator

Yeah makes sense! We might also consider using ahash though, I assume that will yield better performance.

@baszalmstra
Copy link
Collaborator

But prs are welcome!

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