Repository navigation
MirPatch: reduce new statement insertion complexity - #165913
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3e9588f to
e0c8b3b
Compare
|
@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.
MirPatch: reduce new statement insertion complexity
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ec11aa8): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -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 (secondary 5.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.2%)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: 483.169s -> 486.028s (0.59%) |
The previous implementation inserted each new statement in a block separately, which in the worst case moved all existing statements each time. Use a simple merging strategy to improve complexity from O(num existing statements × num new statements) to O(num existing statements + num new statements).
e0c8b3b to
b7ed414
Compare
|
@rustbot reroll |
|
r? dianqk |
|
@bors r+ |
…uwer Rollup of 11 pull requests Successful merges: - #165913 (MirPatch: reduce new statement insertion complexity) - #166081 (test `feature(asm_const_ptr)` with a vtable) - #166094 (Chain the spans of qualified paths instead of having a first-to-last scheme ) - #166113 (Fix dead-code marking dead enum variants as live) - #166118 (rustc_target: catch up with LLVM 24 movement on ppc64le bsd data layout) - #166155 (windows seek_write: document interaction with append mode) - #165935 (Duplicate attribute diagnostic cleanups) - #165948 (lint: Avoid unused_parens warning for ref patterns binding an identifier) - #166018 (`rustc_mir_build`: de-duplicate `local_temp_lifetime()`) - #166111 (Add `cd` alias to `std::env::set_current_dir`) - #166157 (Don't recover invalid literals in attribute parsing)
…uwer Rollup of 11 pull requests Successful merges: - #165913 (MirPatch: reduce new statement insertion complexity) - #166081 (test `feature(asm_const_ptr)` with a vtable) - #166094 (Chain the spans of qualified paths instead of having a first-to-last scheme ) - #166113 (Fix dead-code marking dead enum variants as live) - #166118 (rustc_target: catch up with LLVM 24 movement on ppc64le bsd data layout) - #166155 (windows seek_write: document interaction with append mode) - #165935 (Duplicate attribute diagnostic cleanups) - #165948 (lint: Avoid unused_parens warning for ref patterns binding an identifier) - #166018 (`rustc_mir_build`: de-duplicate `local_temp_lifetime()`) - #166111 (Add `cd` alias to `std::env::set_current_dir`) - #166157 (Don't recover invalid literals in attribute parsing)
Rollup merge of #165913 - tmiasko:patch, r=dianqk MirPatch: reduce new statement insertion complexity The previous implementation inserted each new statement in a block separately, which in the worst case moved all existing statements each time. Use a simple merging strategy to improve complexity from O(num existing statements × num new statements) to O(num existing statements + num new statements). Helps with #121354.
The previous implementation inserted each new statement in a block separately, which in the worst case moved all existing statements each time.
Use a simple merging strategy to improve complexity from O(num existing statements × num new statements) to O(num existing statements + num new statements).
Helps with #121354.