rust/compiler/rustc_data_structures
bors 58457bbfd3 Auto merge of #89404 - Kobzol:hash-stable-sort, r=Mark-Simulacrum
Slightly optimize hash map stable hashing

I was profiling some of the `rustc-perf` benchmarks locally and noticed that quite some time is spent inside the stable hash of hashmaps. I tried to use a `SmallVec` instead of a `Vec` there, which helped very slightly.

Then I tried to remove the sorting, which was a bottleneck, and replaced it with insertion into a binary heap. Locally, it yielded nice improvements in instruction counts and RSS in several benchmarks for incremental builds. The implementation could probably be much nicer and possibly extended to other stable hashes, but first I wanted to test the perf impact properly.

Can I ask someone to do a perf run? Thank you!
2021-12-12 03:50:30 +00:00
..
src Auto merge of #89404 - Kobzol:hash-stable-sort, r=Mark-Simulacrum 2021-12-12 03:50:30 +00:00
Cargo.toml Update to measureme v10 2021-10-07 15:08:44 +02:00