diff options
| author | bors <bors@rust-lang.org> | 2023-01-21 14:18:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-21 14:18:17 +0000 |
| commit | 298a78277e95920a24e147ecaec38ca122204c88 (patch) | |
| tree | d6ad1ac9b963f313b25198d0af94687d52d712e4 /compiler/rustc_parse/src/errors.rs | |
| parent | ce460dcd14d7f020a38614a37f05e8484163c98c (diff) | |
| parent | c1b358945a4e1d4877b21c02fa52afc5ff2b39a7 (diff) | |
| download | rust-298a78277e95920a24e147ecaec38ca122204c88.tar.gz rust-298a78277e95920a24e147ecaec38ca122204c88.zip | |
Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obk
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc) This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble. The changes required are moderate but non-zero: - In some places the collections are extracted into sorted vecs. - There are a few instances where for-loops have been changed to extends. ~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~ Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)). Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). r? `@ghost`
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
