[EXPERIMENT] Check if isolating Matrix::unspecialize dodges regressions - #161647
[EXPERIMENT] Check if isolating Matrix::unspecialize dodges regressions#161647Zalathar wants to merge 1 commit into
Matrix::unspecialize dodges regressions#161647Conversation
|
@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.
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
|
Maybe I was wrong in the original assesment and the culprit is a different insert call in match checking - there's another one in rust/compiler/rustc_pattern_analysis/src/constructor.rs Lines 1106 to 1108 in 05320a2 This was pretty cold in cachegrind, so I didn't pay attention to it very much, but at this point it feels like whatever you do there's some spooky regression at a distance, so maybe it's not as innocent as it looks. (and there's no other insert call in match checking as far as I know, including transitively called ones) |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (0fd30f7): comparison URL. Overall result: no relevant changes - 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 countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary -0.3%, secondary -4.6%)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: 469.244s -> 469.33s (0.02%) |
|
Let's see if only perturbing @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.
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (362939d): comparison URL. Overall result: no relevant changes - 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 countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 7.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.0%)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: 468.927s -> 469.784s (0.18%) |
|
All these results are quite puzzling. So I guess the only remaining explanation is that the regression is not in match checking after all? |
|
btw. The commit benchmarked here #161647 (comment) does nothing ( |
|
Given the above comment, I think the only combination wee haven't tried is this one: 7f86311 (It seems to me that this was the original intent of this PR) I kicked off a perf run in #161496 (comment). If this one doesn't regress, it (most likely means) that the regression is not in match checking code. |
Yes, one of my perf runs was trying to check whether even an identical duplicate of (This made more sense when we thought that particular call site was the culprit. Either way, it didn’t produce an interesting result.) |
|
Here's another experiment: What happens if we switch to the simpler @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.
|
Let's try using insert2 throughout @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.
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5509a41): comparison URL. Overall result: no relevant changes - 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 countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.2%, secondary 3.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 476.343s -> 477.044s (0.15%) |
|
This benchmark result suggests that the sensitive call site is not in |
|
Let's try using insert2 throughout @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.
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (172ad2d): comparison URL. Overall result: no relevant changes - 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 countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -2.4%, secondary 6.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.5%, secondary 3.4%)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: 475.629s -> 476.245s (0.13%) |
- rustc_abi - rustc_codegen_ssa - rustc_hir_analysis - rustc_ty_utils
|
We're running out of candidates, but let's try using insert2 in all remaining places: (patch)
If this doesn't trigger the regression, then either I've missed something, or we have some spooky aggregate effects. @bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
|
Queued a065bfc with parent c42ac5f, future comparison URL. |
View all comments
Matrix::unspecializedodges regressions #161632