rattler
rattler copied to clipboard
Use `rustc-hash` instead of `fxhash`
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 https://github.com/cbreeden/fxhash/issues/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.
Yeah makes sense! We might also consider using ahash though, I assume that will yield better performance.
But prs are welcome!
We have started to use ahash instead: https://github.com/conda/rattler/pull/1674