diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2024-01-15 14:41:12 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2024-01-19 20:49:51 -0500 |
| commit | c3364a23d2a0ec8557f52fcf5a705503619274c3 (patch) | |
| tree | 641f3ad453eb64d925fdbe9e31ce5f00051cfa80 /compiler/rustc_const_eval/src/errors.rs | |
| parent | 88189a71e4e4376eea82ac61db6a539612eb200a (diff) | |
| download | rust-c3364a23d2a0ec8557f52fcf5a705503619274c3.tar.gz rust-c3364a23d2a0ec8557f52fcf5a705503619274c3.zip | |
perf: Don't track specific live points for promoteds
We don't query this information out of the promoted (it's basically a
single "unit" regardless of the complexity within it) and this saves on
re-initializing the SparseIntervalMatrix's backing IndexVec with mostly
empty rows for all of the leading regions in the function. Typical
promoteds will only contain a few regions that need up be uplifted,
while the parent function can have thousands.
For a simple function repeating println!("Hello world"); 50,000 times
this reduces compile times from 90 to 15 seconds in debug mode. The
previous implementations re-initialization led to an overall roughly n^2
runtime as each promoted initialized slots for ~n regions, now we scale
closer to linearly (5000 hello worlds takes 1.1 seconds).
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
