about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2024-01-15 14:41:12 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2024-01-19 20:49:51 -0500
commitc3364a23d2a0ec8557f52fcf5a705503619274c3 (patch)
tree641f3ad453eb64d925fdbe9e31ce5f00051cfa80 /compiler/rustc_codegen_gcc
parent88189a71e4e4376eea82ac61db6a539612eb200a (diff)
downloadrust-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_codegen_gcc')
0 files changed, 0 insertions, 0 deletions