GitHub

Several large improvements landed in the past week:

Great to see so many improvements!

Triage done by @simulacrum. Revision range: d527bc9b..ad0c9dce

Summary:

(instructions:u) mean range count
Regressions ❌
(primary)
16.2% [16.2%, 16.2%] 1
Regressions ❌
(secondary)
0.4% [0.1%, 0.6%] 17
Improvements ✅
(primary)
-3.3% [-50.5%, -0.1%] 143
Improvements ✅
(secondary)
-8.8% [-50.4%, -0.1%] 137
All ❌✅ (primary) -3.1% [-50.5%, 16.2%] 144

2 Regressions, 7 Improvements, 5 Mixed; 5 of them in rollups 30 artifact comparisons made in total

Regressions

Rollup of 20 pull requests #159802 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.3%] 20
Regressions ❌
(secondary)
0.4% [0.2%, 0.6%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.2%, 0.3%] 20

Root caused to #150161, which increases metadata / incremental dep graph and so causes regressions across the board. @panstromek asked for followup from the author on whether that can be mitigated.

Rollup of 28 pull requests #159966 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 6
Regressions ❌
(secondary)
0.4% [0.2%, 0.6%] 22
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 6

Queued up builds on a few of the contained PRs which should hopefully narrow down root cause.

Improvements

Use PGO for Cargo #159149 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.3%] 7
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 6
Improvements ✅
(primary)
-0.2% [-0.5%, -0.1%] 52
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.1%] 51
All ❌✅ (primary) -0.2% [-0.5%, 0.3%] 59

Resolve: more preperation work for parallelizing the import resolution loop #159440 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 18
Improvements ✅
(secondary)
-0.6% [-1.5%, -0.1%] 29
All ❌✅ (primary) -0.2% [-0.3%, -0.2%] 18

Optimize escape_string_symbol() #159609 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.5%, -0.2%] 11
Improvements ✅
(secondary)
-18.4% [-33.7%, -0.2%] 15
All ❌✅ (primary) -0.4% [-0.5%, -0.2%] 11

This is being further iterated on in #159916 to bring these improvements to users without needing replacement of escape_default().to_string() with a hand-coded version; that PR will bring further improvements to include-blob.

Apply RemoveNoopLandingPads post-monomorphization #143208 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-2.2% [-4.9%, -0.2%] 25
Improvements ✅
(secondary)
-3.4% [-20.7%, -0.2%] 22
All ❌✅ (primary) -2.2% [-4.9%, -0.2%] 25

rustdoc: Only inline impls for local primitives #159721 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-7.1% [-28.4%, -1.2%] 20
Improvements ✅
(secondary)
-16.8% [-28.3%, -3.2%] 25
All ❌✅ (primary) -7.1% [-28.4%, -1.2%] 20

Try to make FieldDef smaller #157986 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 12
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.3%, -0.2%] 12

rustdoc: Only synthesize auto/blanket impls for documented items #159779 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-6.5% [-19.1%, -0.8%] 11
Improvements ✅
(secondary)
-5.4% [-13.8%, -0.3%] 3
All ❌✅ (primary) -6.5% [-19.1%, -0.8%] 11

Mixed

Rollup of 14 pull requests #159634 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
0.4% [0.4%, 0.4%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.2%, 0.4%] 4

This seems like it's probably noise - single affected benchmark, and mixed results (improvements and regressions). Not worth further followup.

rustdoc: Only build extern trait impls if needed #159623 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
1.4% [0.6%, 2.2%] 2
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
-10.8% [-30.8%, -1.7%] 18
Improvements ✅
(secondary)
-20.3% [-31.4%, -4.9%] 24
All ❌✅ (primary) -9.6% [-30.8%, 2.2%] 20

Improvements greatly outweigh the small regressions.

codegen: skip stores for entirely-uninit constant aggregate fields #157797 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
16.2% [16.2%, 16.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.2%] 8
All ❌✅ (primary) 16.2% [16.2%, 16.2%] 1

Perf looks clean and slightly improving things across the board. There is one regression (building cranelift with opts) that has a 16% compile-time perf hit entirely in LLVM, so this change tips the optimizations over the edge somewhere and causes lots of changes. I have not checked whether it produces better runtime code, but let's land it regardless.

Quoting from a reviewer comment.

Rollup of 25 pull requests #159942 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.2%, 0.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 9
All ❌✅ (primary) - - 0

Regression has held up in subsequent PRs, appears to be limited to our large-workspace benchmark. This was deemed acceptable on the root cause PR (comment), and given the regression is small it seems OK.

Rollup of 14 pull requests #160003 (Comparison Link)

(instructions:u) mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.1%, 1.3%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 4
All ❌✅ (primary) - - 0

Most likely new-solver specific regression coming from a bug fix #159840.

Read the original on github.com ↗