about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-12 03:50:30 +0000
committerbors <bors@rust-lang.org>2021-12-12 03:50:30 +0000
commit58457bbfd3b08e015bdb03862a1d3cf2d48a800a (patch)
tree88445fa8b6de5be3d113c178fdd0fcecf5a42532 /compiler/rustc_codegen_llvm/src/llvm/mod.rs
parente70e4d499dd9dd1f7ff3717b9d91ca5dd0757143 (diff)
parente4b4d18f589b2d0cfcf244124ab43da34a3d8794 (diff)
downloadrust-58457bbfd3b08e015bdb03862a1d3cf2d48a800a.tar.gz
rust-58457bbfd3b08e015bdb03862a1d3cf2d48a800a.zip
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!
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
0 files changed, 0 insertions, 0 deletions