Cache block seeking results for initialized_at_terminator and _exit - #162450
Conversation
|
Disclosure: An LLM was used to identify this perf effect and to check the performance of the solution. |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Cache block seeking results for initialized_at_terminator and _exit
| if self.cx.initialized_at_terminator(location.block, mpi) { | ||
| let inserted = self.drop_live_at.insert(drop_point); | ||
| // Right now, we should visit a drop_point twice. | ||
| // If we do, this trigger a debug assert so we need we can optimize. | ||
| debug_assert!(inserted, "drop point should not have been visited yet"); |
There was a problem hiding this comment.
This is technically completely unrelated - but sticking it in as a drive-by pass. I had a though that we might be visiting drop points twice (and thus could switch these conditions for a perf benefit) - but the iteration here is unique.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (2bf7717): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -1.4%, secondary -0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 482.327s -> 479.101s (-0.67%) |
9664d1b to
a18e438
Compare
a18e438 to
bbfef75
Compare
|
Beautiful. @bors r+ rollup=never |
|
@bors rollup=iffy |
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - #162450 (Cache block seeking results for initialized_at_terminator and _exit) - #162543 ([rustc_resolve] Correctly keep all reexports in `ModChild::reexport_chain`) - #162712 (perf: Keep the first macro syntax-context mapping inline) - #162747 (Lowering cleanups)
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - #162450 (Cache block seeking results for initialized_at_terminator and _exit) - #162543 ([rustc_resolve] Correctly keep all reexports in `ModChild::reexport_chain`) - #162712 (perf: Keep the first macro syntax-context mapping inline) - #162747 (Lowering cleanups)
|
⌛ Testing commit bbfef75 with merge 40e5555... Workflow: https://github.com/rust-lang/rust/actions/runs/35165799977 |
Cache block seeking results for initialized_at_terminator and _exit Caching the block values post-seek results in significant performance wins (especially on pathological benchmarks). These wins extend to NLL, too. Possibly, this caching could be done further up the stack (more generically), but figured this is a "safer" approach - rather than dealing with other potential fallout. r? lqd
|
@bors yield (to enclosing perf-sensitive rollup) |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #162859. |
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - #162450 (Cache block seeking results for initialized_at_terminator and _exit) - #162543 ([rustc_resolve] Correctly keep all reexports in `ModChild::reexport_chain`) - #162712 (perf: Keep the first macro syntax-context mapping inline) - #162747 (Lowering cleanups)
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - #162450 (Cache block seeking results for initialized_at_terminator and _exit) - #162543 ([rustc_resolve] Correctly keep all reexports in `ModChild::reexport_chain`) - #162712 (perf: Keep the first macro syntax-context mapping inline) - #162747 (Lowering cleanups)
Rollup merge of #162450 - jackh726:polonius-cleanups-4, r=lqd Cache block seeking results for initialized_at_terminator and _exit Caching the block values post-seek results in significant performance wins (especially on pathological benchmarks). These wins extend to NLL, too. Possibly, this caching could be done further up the stack (more generically), but figured this is a "safer" approach - rather than dealing with other potential fallout. r? lqd
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (89b0093): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -3.1%, secondary 3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: missing data |
Caching the block values post-seek results in significant performance wins (especially on pathological benchmarks). These wins extend to NLL, too.
Possibly, this caching could be done further up the stack (more generically), but figured this is a "safer" approach - rather than dealing with other potential fallout.
r? lqd
LLM-generated perf summary table