Skip to content

Commit

Permalink
Auto merge of #137354 - FractalFir:intern_with_cap, r=FractalFir
Browse files Browse the repository at this point in the history
Change interners to start preallocated with an increased capacity

Inspired by rust-lang/rust#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.
  • Loading branch information
bors committed Feb 26, 2025
2 parents 513eac7 + 99beae8 commit 99f0846
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 99f0846

Please sign in to comment.