about summary refs log tree commit diff
path: root/compiler/rustc_session/src/utils.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-26 13:01:45 +0000
committerbors <bors@rust-lang.org>2025-02-26 13:01:45 +0000
commitac91805f3179fc2225c60e8ccf5a1daa09d43f3d (patch)
tree3c84a9c84cebe59e0608228516706aaee9720f8c /compiler/rustc_session/src/utils.rs
parent2af87eab3b4890d62ad998cf9c55e076d91bf06a (diff)
parent7d2cfcab9d8291e412f41e43cdadf587d700d577 (diff)
downloadrust-ac91805f3179fc2225c60e8ccf5a1daa09d43f3d.tar.gz
rust-ac91805f3179fc2225c60e8ccf5a1daa09d43f3d.zip
Auto merge of #137354 - FractalFir:intern_with_cap, r=FractalFir
Change interners to start preallocated with an increased capacity

Inspired by https://github.com/rust-lang/rust/issues/137005.

Added a `with_capacity` function to `InternedSet`. Changed the `CtxtInterners` to start with `InternedSets` preallocated with a capacity.

This *does* increase memory usage at very slightly(by ~1 MB at the start), altough that increase quickly disaperars for larger crates(since they require such capacity anyway).

A local perf run indicates this improves compiletimes for small crates(like `ripgrep`), without a negative effect on larger ones.
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
0 files changed, 0 insertions, 0 deletions