Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add feature to use rustc-hash (#423)
We use `rustc-hash::FxHashMap/Set` on src/visibility_tracker.rs this is an implementation detail as AFAIK all types there are `pub(crate)` so we never return an `FxHashMap` or `FxHashSet` on a public interface. This bring a nice perf increase: ```console ❯ cargo criterion --bench indexed_crate IndexedCrate/new(aws-sdk-ec2) time: [1.3474 s 1.3506 s 1.3537 s] change: [+4.4411% +4.8278% +5.2381%] (p = 0.00 < 0.05) Performance has regressed. ❯ cargo criterion --bench indexed_crate --features rustc-hash IndexedCrate/new(aws-sdk-ec2) time: [1.1555 s 1.1561 s 1.1567 s] change: [-14.603% -14.405% -14.192%] (p = 0.00 < 0.05) Performance has improved. ❯ cargo criterion --bench indexed_crate --features rayon IndexedCrate/new(aws-sdk-ec2) time: [577.26 ms 578.45 ms 579.70 ms] change: [-50.083% -49.964% -49.852%] (p = 0.00 < 0.05) Performance has improved. ❯ cargo criterion --bench indexed_crate --features rayon,rustc-hash IndexedCrate/new(aws-sdk-ec2) time: [486.94 ms 488.49 ms 490.13 ms] change: [-15.862% -15.552% -15.212%] (p = 0.00 < 0.05) Performance has improved. ``` Co-authored-by: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com>
- Loading branch information