rattler icon indicating copy to clipboard operation
rattler copied to clipboard

Use `rustc-hash` instead of `fxhash`

Open 0xbe7a opened this issue 8 months ago • 2 comments

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.

0xbe7a avatar Jun 01 '24 12:06 0xbe7a