rust/compiler/rustc_middle/src
bors 098d4fd74c Auto merge of #119977 - Mark-Simulacrum:defid-cache, r=cjgillot
Cache local DefId-keyed queries without hashing

This caches local DefId-keyed queries using just an IndexVec. This costs ~5% extra max-rss at most but brings significant runtime improvement, up to 13% cycle counts (mean: 4%) on primary benchmarks. It's possible that further tweaks could reduce the memory overhead further but this win seems worth landing despite the increased memory, particularly with regards to eliminating the present set in non-incr or storing it inline (skip list?) with the main data.

We tried applying this scheme to all keys in the [first perf run] but found that it carried a significant memory hit (50%). instructions/cycle counts were also much more mixed, though that may have been due to the lack of the present set optimization (needed for fast iter() calls in incremental scenarios).

Closes https://github.com/rust-lang/rust/issues/45275

[first perf run]: https://perf.rust-lang.org/compare.html?start=30dfb9e046aeb878db04332c74de76e52fb7db10&end=6235575300d8e6e2cc6f449cb9048722ef43f9c7&stat=instructions:u
2024-01-16 21:58:10 +00:00
..
dep_graph Reduce exposure of things. 2023-11-16 16:49:22 +11:00
hir Unify SourceFile::name_hash and StableSourceFileId 2023-12-19 22:34:26 +01:00
hooks Rename hook. 2023-11-01 16:49:18 +00:00
infer NFC: do not clone types that are copy 2023-12-15 23:19:51 +01:00
middle Add check for ui_testing via promoting parameters from ParseSess to Session 2024-01-13 12:11:13 -05:00
mir large_assignments: Lint on specific large args passed to functions 2024-01-15 19:07:12 +01:00
query Cache local DefId-keyed queries without hashing 2024-01-15 17:16:45 -05:00
thir Remove thir::Guard 2024-01-05 10:56:59 +00:00
traits Rollup merge of #119897 - compiler-errors:fulfillment-errors, r=lcnr 2024-01-15 08:44:48 +01:00
ty Auto merge of #116520 - Enselic:large-copy-into-fn, r=oli-obk 2024-01-16 19:33:14 +00:00
util compiler: Lower fn call arg spans down to MIR 2024-01-15 19:07:11 +01:00
arena.rs specialization_graph_of's errored field is used in the only call site, and used to immediately throw away the rest of the value. Let's use Result to statically signal that this is happening 2024-01-11 20:34:59 +00:00
error.rs don't point at const usage site for resolution-time errors 2023-09-14 22:34:05 +02:00
lib.rs update cfg(bootstrap)s 2023-12-22 11:14:11 +01:00
lint.rs Change how force-warn lint diagnostics are recorded. 2024-01-11 07:56:17 +11:00
macros.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Don't populate yield and resume types after the fact 2024-01-06 18:03:01 +00:00
values.rs Rename consuming chaining methods on DiagnosticBuilder. 2024-01-10 07:40:00 +11:00