rust/compiler/rustc_data_structures/src
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
..
base_n mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
binary_search_util Stop enabling in_band_lifetimes in rustc_data_structures 2021-12-05 20:17:35 -08:00
graph Annotate comments onto the LT algorithm 2021-12-06 20:30:15 -05:00
obligation_forest Remove for loop range 2021-10-10 16:32:16 +02:00
owning_ref Also fix “a OwningRef 2021-08-24 02:28:38 +02:00
sip128 SipHasher128: improve constant names and add more comments 2020-10-11 23:48:35 -07:00
small_c_str mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
snapshot_map mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
sorted_map Stop enabling in_band_lifetimes in rustc_data_structures 2021-12-05 20:17:35 -08:00
sso Stop enabling in_band_lifetimes in rustc_data_structures 2021-12-05 20:17:35 -08:00
stable_hasher Stable hashing: add comments and tests concerning platform-independence 2020-09-30 00:57:35 -07:00
tagged_ptr Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
thin_vec Add FromIterator and IntoIterator impls for ThinVec 2021-04-05 19:09:51 -07:00
tiny_list Move some test-only code to test files 2021-03-17 10:31:30 -04:00
transitive_relation Move some test-only code to test files 2021-03-17 10:31:30 -04:00
vec_map Add VecMap to rustc_data_structures 2021-06-07 19:03:51 -03:00
atomic_ref.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
base_n.rs Apply clippy suggestions 2021-10-10 15:38:19 +02:00
captures.rs Remove #[allow(unused_lifetimes)] which is now unnecessary 2021-06-17 08:56:54 +09:00
fingerprint.rs Remove redundant [..]s 2021-12-09 00:01:29 +01:00
flock.rs Fix the flock fallback implementation 2021-08-15 18:44:06 +02:00
frozen.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
functor.rs Make IdFunctor::try_map_id panic-safe 2021-12-07 11:11:23 +00:00
fx.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
jobserver.rs datastructures: replace lazy_static by SyncLazy from std 2020-09-01 22:06:47 +01:00
lib.rs Make IdFunctor::try_map_id panic-safe 2021-12-07 11:11:23 +00:00
macros.rs Allow variant attributes in enum_from_u32! 2021-02-28 11:53:55 -08:00
map_in_place.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
memmap.rs Add safety comment to StableAddress impl for Mmap 2021-04-03 14:51:05 +02:00
profiling.rs Remove redundant [..]s 2021-12-09 00:01:29 +01:00
ptr_key.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
sharded.rs Use <[T; N]>::map in Sharded instead of SmallVec and unsafe code 2021-09-18 15:07:24 +02:00
sip128.rs SipHasher128: improve constant names and add more comments 2020-10-11 23:48:35 -07:00
small_c_str.rs Remove redundant [..]s 2021-12-09 00:01:29 +01:00
sorted_map.rs Use SortedMap in HIR. 2021-10-21 23:08:57 +02:00
stable_hasher.rs Auto merge of #89404 - Kobzol:hash-stable-sort, r=Mark-Simulacrum 2021-12-12 03:50:30 +00:00
stable_map.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
stable_set.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
stack.rs Apply clippy suggestions 2021-10-10 15:38:19 +02:00
steal.rs more clippy fixes 2021-11-07 16:59:05 +01:00
svh.rs Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
sync.rs Fix typos “a”→“an” 2021-08-22 15:35:11 +02:00
tagged_ptr.rs Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
temp_dir.rs Capitalize safety comments 2020-09-08 22:37:18 -04:00
thin_vec.rs Remove SmallVector mention 2021-09-05 06:10:21 +02:00
tiny_list.rs Apply clippy suggestions 2021-10-10 15:38:19 +02:00
transitive_relation.rs Move some test-only code to test files 2021-03-17 10:31:30 -04:00
unhash.rs Avoid rehashing Fingerprint as a map key 2020-09-01 18:27:02 -07:00
vec_linked_list.rs Stop enabling in_band_lifetimes in rustc_data_structures 2021-12-05 20:17:35 -08:00
vec_map.rs Add VecMap::get_value_matching and assert if > 1 element 2021-07-23 08:44:23 -03:00
work_queue.rs Remove (lots of) dead code 2021-03-27 22:16:33 -04:00