|
| 1 | +# 2026-08-09 Triage Log |
| 2 | + |
| 3 | +This week so many new performance improvements landed that we needed to roll 10 of them up together to keep the bors queue manageable, great work! |
| 4 | +Also new is the LLVM 23 update which caused massive compile-time, run-time, bootstrap time and artifact size improvements. |
| 5 | +These improvements are reduced by the merge of Polonius Alpha on nightly causing a 3.0% regression. There still seems to be some potential to mitigate this regression. |
| 6 | + |
| 7 | +Triage done by **@JonathanBrouwer**. |
| 8 | +Revision range: [65dd30fb..771916f9](https://perf.rust-lang.org/?start=65dd30fb9e882a7e8f0be10caca62936db2a98b8&end=771916f9028e7fe56d2685f2c4f698de5d7d6a45&absolute=false&stat=instructions%3Au) |
| 9 | + |
| 10 | +**Summary**: |
| 11 | + |
| 12 | +| (instructions:u) | mean | range | count | |
| 13 | +|:----------------------------------:|:-----:|:---------------:|:-----:| |
| 14 | +| Regressions ❌ <br /> (primary) | 4.6% | [0.2%, 12.8%] | 24 | |
| 15 | +| Regressions ❌ <br /> (secondary) | 4.3% | [0.2%, 14.3%] | 30 | |
| 16 | +| Improvements ✅ <br /> (primary) | -3.3% | [-16.4%, -0.2%] | 251 | |
| 17 | +| Improvements ✅ <br /> (secondary) | -5.2% | [-34.8%, -0.2%] | 308 | |
| 18 | +| All ❌✅ (primary) | -2.6% | [-16.4%, 12.8%] | 275 | |
| 19 | + |
| 20 | + |
| 21 | +1 Regression, 4 Improvements, 7 Mixed; 5 of them in rollups |
| 22 | +25 artifact comparisons made in total |
| 23 | + |
| 24 | +#### Regressions |
| 25 | + |
| 26 | +Rollup of 22 pull requests [#160517](https://github.com/rust-lang/rust/pull/160517) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=1ed2df61a19042f231709eb05d032ae9e2cb2084&end=7218ebe93668f51a94a572b690c433dfdbdc2c3d&stat=instructions:u) |
| 27 | + |
| 28 | +| (instructions:u) | mean | range | count | |
| 29 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 30 | +| Regressions ❌ <br /> (primary) | 0.6% | [0.2%, 1.9%] | 11 | |
| 31 | +| Regressions ❌ <br /> (secondary) | 0.5% | [0.2%, 1.8%] | 13 | |
| 32 | +| Improvements ✅ <br /> (primary) | -0.8% | [-0.8%, -0.8%] | 1 | |
| 33 | +| Improvements ✅ <br /> (secondary) | - | - | 0 | |
| 34 | +| All ❌✅ (primary) | 0.5% | [-0.8%, 1.9%] | 12 | |
| 35 | + |
| 36 | +Most of this regression is noise, showing up on all PRs that were part of this rollup identically. |
| 37 | +The one exception is [#160480](https://github.com/rust-lang/rust/pull/160480), which changes the implementation of `to_ascii_uppercase` and `to_ascii_lowercase` to be faster. |
| 38 | +While the run-time performance of these functions improve, they are now slower to compile because they use more generics. Why this effect is so significant is unclear. |
| 39 | + |
| 40 | +#### Improvements |
| 41 | + |
| 42 | +perf: Lock-free root fast paths for hygiene queries [#160494](https://github.com/rust-lang/rust/pull/160494) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=26bfbf28f5f79dff333ce5a232f131b496ec9cfe&end=f73951df0a5566d94d13b7954acd9f4ab1fa3734&stat=instructions:u) |
| 43 | + |
| 44 | +| (instructions:u) | mean | range | count | |
| 45 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 46 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 47 | +| Regressions ❌ <br /> (secondary) | - | - | 0 | |
| 48 | +| Improvements ✅ <br /> (primary) | -0.3% | [-0.7%, -0.2%] | 61 | |
| 49 | +| Improvements ✅ <br /> (secondary) | -0.8% | [-2.3%, -0.1%] | 42 | |
| 50 | +| All ❌✅ (primary) | -0.3% | [-0.7%, -0.2%] | 61 | |
| 51 | + |
| 52 | + |
| 53 | +Optimize handling of solver errors [#160160](https://github.com/rust-lang/rust/pull/160160) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=88f7399cb4912680976e1c342ea7661b9dc84940&end=ae45457594a670c59cd4d5591eaa243d9a3d44d5&stat=instructions:u) |
| 54 | + |
| 55 | +| (instructions:u) | mean | range | count | |
| 56 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 57 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 58 | +| Regressions ❌ <br /> (secondary) | 0.6% | [0.5%, 0.6%] | 3 | |
| 59 | +| Improvements ✅ <br /> (primary) | -0.3% | [-0.6%, -0.2%] | 27 | |
| 60 | +| Improvements ✅ <br /> (secondary) | -0.6% | [-2.7%, -0.3%] | 36 | |
| 61 | +| All ❌✅ (primary) | -0.3% | [-0.6%, -0.2%] | 27 | |
| 62 | + |
| 63 | + |
| 64 | +Optimize `try_evaluate_obligations` [#160479](https://github.com/rust-lang/rust/pull/160479) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=ae45457594a670c59cd4d5591eaa243d9a3d44d5&end=65bcac45b3d8a8b2126e5cc844cf6fff5795d32a&stat=instructions:u) |
| 65 | + |
| 66 | +| (instructions:u) | mean | range | count | |
| 67 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 68 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 69 | +| Regressions ❌ <br /> (secondary) | - | - | 0 | |
| 70 | +| Improvements ✅ <br /> (primary) | - | - | 0 | |
| 71 | +| Improvements ✅ <br /> (secondary) | -1.6% | [-5.1%, -0.2%] | 20 | |
| 72 | +| All ❌✅ (primary) | - | - | 0 | |
| 73 | + |
| 74 | + |
| 75 | +[perf] Reuse existing trait reference instead of recreating it. [#160539](https://github.com/rust-lang/rust/pull/160539) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=7dfb9d0c40d3338e1a27f0f787182c6b90e6791e&end=49c80b5a0db8abd63315c04ff34f58629e388281&stat=instructions:u) |
| 76 | + |
| 77 | +| (instructions:u) | mean | range | count | |
| 78 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 79 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 80 | +| Regressions ❌ <br /> (secondary) | - | - | 0 | |
| 81 | +| Improvements ✅ <br /> (primary) | - | - | 0 | |
| 82 | +| Improvements ✅ <br /> (secondary) | -4.4% | [-7.5%, -0.3%] | 7 | |
| 83 | +| All ❌✅ (primary) | - | - | 0 | |
| 84 | + |
| 85 | + |
| 86 | +#### Mixed |
| 87 | + |
| 88 | +Rollup of 10 perf-sensitive pull requests [#160506](https://github.com/rust-lang/rust/pull/160506) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=0b63defc8fd68957c635fe61f097b84df8fd9611&end=1ed2df61a19042f231709eb05d032ae9e2cb2084&stat=instructions:u) |
| 89 | + |
| 90 | +| (instructions:u) | mean | range | count | |
| 91 | +|:----------------------------------:|:-----:|:---------------:|:-----:| |
| 92 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 93 | +| Regressions ❌ <br /> (secondary) | 0.5% | [0.5%, 0.5%] | 1 | |
| 94 | +| Improvements ✅ <br /> (primary) | -1.7% | [-6.2%, -0.2%] | 237 | |
| 95 | +| Improvements ✅ <br /> (secondary) | -4.7% | [-34.7%, -0.1%] | 230 | |
| 96 | +| All ❌✅ (primary) | -1.7% | [-6.2%, -0.2%] | 237 | |
| 97 | + |
| 98 | +This is a rollup of 10 perf-sensitive pull requestions, this was made for the first time because the queue was too large. |
| 99 | +After the rollup was merged, every PR in the rollup was individually benchmarked. |
| 100 | +The following 10 PRs were rolled up: (below each PR the effect on benchmarks is listed) |
| 101 | + |
| 102 | +* [perf: skip irrelevant foreign impls when building the specialization graph - #157281](https://github.com/rust-lang/rust/pull/157281#issuecomment-5188979580) |
| 103 | + |
| 104 | + -1.5% [-6.1%, -0.2%] 209 |
| 105 | +* [Next steps for FnDef binder changes](https://github.com/rust-lang/rust/pull/159403#issuecomment-5189362799) |
| 106 | + |
| 107 | + 0.3% [-0.2%, 0.4%] 19 |
| 108 | + |
| 109 | + This change is a part of the ongoing effort to clean up binder/turbofishing behavior in the compiler. |
| 110 | + While the perf regression was known before merging, it wasn't explained by the author. Author has been pinged. |
| 111 | +* [Optimize crate resolution for large workspace](https://github.com/rust-lang/rust/pull/159763#issuecomment-5189793061) |
| 112 | + |
| 113 | + -7.5% [-15.3%, -1.7%] 11 (secondary, no effect on primaries) |
| 114 | +* [Speed up EverInitializedPlaces](https://github.com/rust-lang/rust/pull/160033#issuecomment-5190192416) |
| 115 | + |
| 116 | + -0.4% [-0.6%, -0.2%] 10 |
| 117 | +* [store the fulfillment engine inline in ObligationCtxt](https://github.com/rust-lang/rust/pull/160268#issuecomment-5190941859) |
| 118 | + |
| 119 | + -0.5% [-1.4%, -0.2%] 71 |
| 120 | +* [Cache already-checked types in the privacy visitor](https://github.com/rust-lang/rust/pull/160317#issuecomment-5191318930) |
| 121 | + |
| 122 | + -0.5% [-1.1%, -0.2%] 57 |
| 123 | +* [interpret: skip deref-projection validity checks when they are not needed](https://github.com/rust-lang/rust/pull/160399#issuecomment-5191715368) |
| 124 | + |
| 125 | + -12.8% [-13.9%, -11.9%] 6 (secondary, no effect on primaries) |
| 126 | +* [Deduplicate target and host filesearch](https://github.com/rust-lang/rust/pull/160451#issuecomment-5192147316) |
| 127 | + |
| 128 | + -0.7% [-1.4%, -0.3%] 11 (secondary, no effect on primaries) |
| 129 | +* [Add fast path to escape_string_symbol](https://github.com/rust-lang/rust/pull/160453#issuecomment-5192623577) |
| 130 | + |
| 131 | + -19.2% [-34.8%, -4.4%] 14 (secondary, no effect on primaries) |
| 132 | +* [Add offload guard flags to typeck to prevent perf regressions](https://github.com/rust-lang/rust/pull/160454#issuecomment-5193112704) |
| 133 | + |
| 134 | + -0.4% [-0.5%, -0.2%] 10 (secondary, no effect on primaries) |
| 135 | + |
| 136 | + |
| 137 | +Update to LLVM 23 [#158734](https://github.com/rust-lang/rust/pull/158734) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=7218ebe93668f51a94a572b690c433dfdbdc2c3d&end=1b29cfdbee8ee37333f4b24afb936350eb57e705&stat=instructions:u) |
| 138 | + |
| 139 | +| (instructions:u) | mean | range | count | |
| 140 | +|:----------------------------------:|:-----:|:---------------:|:-----:| |
| 141 | +| Regressions ❌ <br /> (primary) | 0.5% | [0.2%, 0.7%] | 14 | |
| 142 | +| Regressions ❌ <br /> (secondary) | 1.7% | [0.0%, 9.1%] | 27 | |
| 143 | +| Improvements ✅ <br /> (primary) | -2.6% | [-16.8%, -0.2%] | 208 | |
| 144 | +| Improvements ✅ <br /> (secondary) | -2.0% | [-11.9%, -0.0%] | 246 | |
| 145 | +| All ❌✅ (primary) | -2.4% | [-16.8%, 0.7%] | 222 | |
| 146 | + |
| 147 | +Not only does the LLVM 23 update have an overwhelmingly positive effect on compile-time performance, |
| 148 | +it also seriously improves run-time performance (-6.9% on the raytracer benchmark), it reduces bootstrap time by 7.7%, and reduces binary size by 0.2%. |
| 149 | +Thanks to everyone who worked on landing this update! |
| 150 | + |
| 151 | +Type fallback refactorings [#159026](https://github.com/rust-lang/rust/pull/159026) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=1b29cfdbee8ee37333f4b24afb936350eb57e705&end=22950ab9e29e11620a10905f027f141ea126966e&stat=instructions:u) |
| 152 | + |
| 153 | +| (instructions:u) | mean | range | count | |
| 154 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 155 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 156 | +| Regressions ❌ <br /> (secondary) | 0.3% | [0.1%, 0.6%] | 12 | |
| 157 | +| Improvements ✅ <br /> (primary) | - | - | 0 | |
| 158 | +| Improvements ✅ <br /> (secondary) | -2.2% | [-3.1%, -0.1%] | 13 | |
| 159 | +| All ❌✅ (primary) | - | - | 0 | |
| 160 | + |
| 161 | +The perf regression is noise, while the improvements are real. |
| 162 | + |
| 163 | +Rollup of 25 pull requests [#160559](https://github.com/rust-lang/rust/pull/160559) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=22950ab9e29e11620a10905f027f141ea126966e&end=87212cef77e7bfa92ba0c4850be1d089745ba6fc&stat=instructions:u) |
| 164 | + |
| 165 | +| (instructions:u) | mean | range | count | |
| 166 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 167 | +| Regressions ❌ <br /> (primary) | 0.2% | [0.1%, 0.2%] | 2 | |
| 168 | +| Regressions ❌ <br /> (secondary) | 0.3% | [0.1%, 0.5%] | 16 | |
| 169 | +| Improvements ✅ <br /> (primary) | - | - | 0 | |
| 170 | +| Improvements ✅ <br /> (secondary) | -0.4% | [-0.8%, -0.2%] | 13 | |
| 171 | +| All ❌✅ (primary) | 0.2% | [0.1%, 0.2%] | 2 | |
| 172 | + |
| 173 | +The performance improvements and some of the regressions are noise. |
| 174 | +[The rest of the regressions are caused by changes in rustc-perf.](https://github.com/rust-lang/rust/pull/160510#issuecomment-5216265249) |
| 175 | + |
| 176 | +Enable polonius alpha on nightly [#159343](https://github.com/rust-lang/rust/pull/159343) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=87212cef77e7bfa92ba0c4850be1d089745ba6fc&end=7608eb7b07eaf93f16d7cf5bcb2098eca87503df&stat=instructions:u) |
| 177 | + |
| 178 | +| (instructions:u) | mean | range | count | |
| 179 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 180 | +| Regressions ❌ <br /> (primary) | 3.0% | [0.2%, 15.7%] | 89 | |
| 181 | +| Regressions ❌ <br /> (secondary) | 2.3% | [0.2%, 17.3%] | 108 | |
| 182 | +| Improvements ✅ <br /> (primary) | - | - | 0 | |
| 183 | +| Improvements ✅ <br /> (secondary) | -0.9% | [-1.3%, -0.3%] | 9 | |
| 184 | +| All ❌✅ (primary) | 3.0% | [0.2%, 15.7%] | 89 | |
| 185 | + |
| 186 | +This enables polonius alpha on nightly, which represents years of work on making the borrow checker stronger. |
| 187 | +This is not enabled on stable yet, thus the performance regression won't be present there. |
| 188 | +Polonius does strictly more work so getting this to zero will be impossible. |
| 189 | +Serde is the biggest regression with a 15.6% regression. |
| 190 | + |
| 191 | +While some performance work has already been done on polonius alpha, there seems to be quite some opportunities left. |
| 192 | +One of those that @panstromek mentioned is that the `IntervalSet` datatype could be optimized further. |
| 193 | + |
| 194 | +Rollup of 17 pull requests [#160627](https://github.com/rust-lang/rust/pull/160627) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=887804d5686c3bf9a090b5bbc23e3dcdfd9e316a&end=84b36a78a28a63f134171c670be1932ffa2485f8&stat=instructions:u) |
| 195 | + |
| 196 | +| (instructions:u) | mean | range | count | |
| 197 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 198 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 199 | +| Regressions ❌ <br /> (secondary) | 0.4% | [0.2%, 0.5%] | 7 | |
| 200 | +| Improvements ✅ <br /> (primary) | -0.3% | [-0.3%, -0.2%] | 5 | |
| 201 | +| Improvements ✅ <br /> (secondary) | -0.3% | [-0.3%, -0.2%] | 4 | |
| 202 | +| All ❌✅ (primary) | -0.3% | [-0.3%, -0.2%] | 5 | |
| 203 | + |
| 204 | +The new-solver benchmark improvements seem to be noise. |
| 205 | +Some improvements caused by https://github.com/rust-lang/rust/pull/160555. |
| 206 | +Perf regression caused by https://github.com/rust-lang/rust/pull/160464. Pinged the authors. |
| 207 | + |
| 208 | +Rollup of 28 pull requests [#160725](https://github.com/rust-lang/rust/pull/160725) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=1a98b1e135b254f209c67d447b6d8bcd56a859e0&end=7dfb9d0c40d3338e1a27f0f787182c6b90e6791e&stat=instructions:u) |
| 209 | + |
| 210 | +| (instructions:u) | mean | range | count | |
| 211 | +|:----------------------------------:|:-----:|:--------------:|:-----:| |
| 212 | +| Regressions ❌ <br /> (primary) | - | - | 0 | |
| 213 | +| Regressions ❌ <br /> (secondary) | 0.7% | [0.5%, 0.9%] | 2 | |
| 214 | +| Improvements ✅ <br /> (primary) | -0.4% | [-0.5%, -0.3%] | 2 | |
| 215 | +| Improvements ✅ <br /> (secondary) | -0.3% | [-0.3%, -0.2%] | 3 | |
| 216 | +| All ❌✅ (primary) | -0.4% | [-0.5%, -0.3%] | 2 | |
| 217 | + |
| 218 | +Improvements outweigh regressions. |
| 219 | +The regressions may or may not be caused by a separate PR, but are so small that they are not worth hunting down. |
0 commit comments