rust/compiler/rustc_middle/src/middle
bors c9b45e6010 Auto merge of #90253 - Kobzol:hash-stable-sort-index-map, r=cjgillot
Change several HashMaps to IndexMap to improve incremental hashing performance

Stable hashing hash maps in incremental mode takes a lot of time, especially for some benchmarks like `clap`. As noted by `@Mark-Simulacrum` [here](https://github.com/rust-lang/rust/pull/89404#issuecomment-950043892), this cost could be reduced by replacing some hash maps by indexmaps.

I gathered some statistics and found several hash maps that took a lot of time to hash and replaced them by indexmaps. However, in order for this to work, we need to make sure that these indexmaps have deterministic insertion order. These three are used only in visitors as far as I can see, which seems deterministic. Can we enforce this somehow? Or should some explaining comment be included for these maps?
2022-03-11 16:37:55 +00:00
..
codegen_fn_attrs.rs #[used(linker)] attribute (https://github.com/dtolnay/linkme/issues/41) 2022-02-06 20:23:23 +01:00
dependency_format.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
exported_symbols.rs Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
lang_items.rs don't take TyCtxt by reference 2020-09-18 20:49:25 +02:00
limits.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
mod.rs Remove SymbolStr. 2021-12-15 13:30:26 +11:00
privacy.rs Compute most of Public/Exported access level in rustc_resolve 2022-01-09 21:33:14 +00:00
region.rs Auto merge of #90253 - Kobzol:hash-stable-sort-index-map, r=cjgillot 2022-03-11 16:37:55 +00:00
resolve_lifetime.rs Remove LifetimeDefOrigin 2022-02-24 18:50:33 -08:00
stability.rs Remove useless map. 2022-03-03 18:14:34 +01:00