2023-12-11 Triage Log

A quiet week overall. A few smaller crate (e.g., helloworld) benchmarks saw significant improvements in #118568, but this merely restores performance regressed earlier.

Triage done by @simulacrum. Revision range: 9358642..5701093

Summary:

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.5%[0.2%, 1.3%]111
Regressions ❌
(secondary)
0.7%[0.1%, 1.5%]34
Improvements ✅
(primary)
-5.2%[-11.1%, -0.5%]18
Improvements ✅
(secondary)
-4.6%[-10.5%, -0.4%]72
All ❌✅ (primary)-0.3%[-11.1%, 1.3%]129

5 Regressions, 2 Improvements, 3 Mixed; 2 of them in rollups 69 artifact comparisons made in total

Regressions

compile-time evaluation: detect writes through immutable pointers #118324 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.9%[0.3%, 1.4%]12
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

I feel like the remaining regression is small enough to be acceptable. We're doing more checks in const-eval, and there are no regressions in the builds of real crates.

(https://github.com/rust-lang/rust/pull/118324#issuecomment-1832836626)

Introduce support for async gen blocks #118420 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.2%[0.1%, 0.3%]23
Regressions ❌
(secondary)
0.4%[0.2%, 0.7%]3
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.2%[0.1%, 0.3%]23

New functionality costs some additional time across some benchmarks.

Rollup of 6 pull requests #118763 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.4%[0.2%, 0.5%]18
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.4%[0.2%, 0.5%]18

We do a little bit more work after that PR because the reachable set is slightly bigger and that in turn means more MIR gets encoded and things like that.

(https://github.com/rust-lang/rust/pull/118763#issuecomment-1850073772)

Don‘t warn an empty pattern unreachable if we’re not sure the data is valid #118308 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.6%[0.2%, 0.9%]4
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]6
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.6%[0.2%, 0.9%]4

Yeah I expected a perf regression because of the validity tracking. It adds an extra step for every constructor we try, and match-stress has an enum with 8000 of these. I don‘t think there’s a way around it, I need to know the validity of every inspected place.

(https://github.com/rust-lang/rust/pull/118308#issuecomment-1831103831)

This adds costs particularly to crates with lots or large matches, seen across a few primary workloads and within rustc bootstrap. This is a diagnostic correctness fix, so some cost is acceptable.

Restore const PartialEq #118661 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.3%[0.2%, 0.4%]9
Regressions ❌
(secondary)
0.3%[0.2%, 0.6%]11
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.8%[-0.8%, -0.8%]1
All ❌✅ (primary)0.3%[0.2%, 0.4%]9

Feature addition carrying likely unavoidable cost in some benchmarks.

Improvements

Avoid adding builtin functions to symbols.o #118568 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-6.6%[-11.0%, -0.7%]14
Improvements ✅
(secondary)
-5.0%[-10.7%, -0.3%]66
All ❌✅ (primary)-6.6%[-11.0%, -0.7%]14

Smaller benchmarks show significant improvements, recovering a past performance regression. See PR description for details.

Rollup of 8 pull requests #118838 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.9%[-1.0%, -0.9%]6
All ❌✅ (primary)--0

https://github.com/rust-lang/rust/pull/118822 is the likely cause, but not worth digging deeper on this improvement.

Mixed

split NormalizesTo out of Projection 3 #118725 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.4%[0.2%, 0.9%]17
Regressions ❌
(secondary)
0.3%[0.2%, 0.3%]3
Improvements ✅
(primary)
-2.6%[-2.6%, -2.6%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.3%[-2.6%, 0.9%]18

Moving code around in hot area, with slightly different work being done. Seems to add some cost to a few primary benchmarks.

See details in https://github.com/rust-lang/rust/pull/118725#issuecomment-1847121861

never_patterns: Parse match arms with no body #118527 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.1%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-0.9%[-1.0%, -0.8%]2
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-0.5%[-1.0%, 0.1%]3

Regression is justified by the extra work for this new feature.

Improve print_tts #114571 (Comparison Link)

(instructions:u)meanrangecount
Regressions ❌
(primary)
0.2%[0.2%, 0.2%]1
Regressions ❌
(secondary)
0.8%[0.5%, 1.0%]8
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.2%]2
All ❌✅ (primary)0.2%[0.2%, 0.2%]1

Regressions mostly limited to secondary benchmarks. Single primary regression is in incr-unchanged and is relatively small.