|
| 1 | +# 2022-07-19 Triage Log |
| 2 | + |
| 3 | +A rather rough week for compiler performance with regressions outweighing improvements by a considerable margin, in particular in real world crates. To add insult to injury, the biggest regressions came in rollups which make it difficult to trace the cause. |
| 4 | + |
| 5 | +Triage done by **@rylev**. |
| 6 | +Revision range: [b3f4c3119957aa0a250cab08ab586b7a9a680ef1..8bd12e8cca3f28f302b9cc0f1f47bb64bd1f98fd](https://perf.rust-lang.org/?start=b3f4c3119957aa0a250cab08ab586b7a9a680ef1&end=8bd12e8cca3f28f302b9cc0f1f47bb64bd1f98fd&absolute=false&stat=instructions%3Au) |
| 7 | + |
| 8 | +**Summary**: |
| 9 | + |
| 10 | +| | mean | max | count | |
| 11 | +|:----------:|:----:|:---:|:-----:| |
| 12 | +| Regressions πΏ <br /> (primary) | 1.5% | 4.0% | 176 | |
| 13 | +| Regressions πΏ <br /> (secondary) | 1.8% | 6.4% | 147 | |
| 14 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 15 | +| Improvements π <br /> (secondary) | -1.6% | -4.1% | 9 | |
| 16 | +| All πΏπ (primary) | 1.5% | 4.0% | 176 | |
| 17 | + |
| 18 | + |
| 19 | +7 Regressions, 5 Improvements, 3 Mixed; 4 of them in rollups |
| 20 | +48 artifact comparisons made in total |
| 21 | + |
| 22 | +#### Regressions |
| 23 | + |
| 24 | +Rollup of 6 pull requests [#99177](https://github.com/rust-lang/rust/pull/99177) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=b3f4c3119957aa0a250cab08ab586b7a9a680ef1&end=1c7b36d4db582cb47513a6c7176baaec1c3346ab&stat=instructions:u) |
| 25 | + |
| 26 | +| | mean | max | count | |
| 27 | +|:----------:|:----:|:---:|:-----:| |
| 28 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 29 | +| Regressions πΏ <br /> (secondary) | 0.5% | 0.6% | 9 | |
| 30 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 31 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 32 | +| All πΏπ (primary) | N/A | N/A | 0 | |
| 33 | +- Relatively small regression in secondary benchmarks. Nothing stands out as an obvious culprit, so we can mark as triaged. |
| 34 | + |
| 35 | + |
| 36 | +Pull Derefer before ElaborateDrops [#98145](https://github.com/rust-lang/rust/pull/98145) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=ca4e39400ef33198e2715973d1c67a1d3cee15e7&end=42bd138126b0a9d38d65bc9973e72de3c5b6c37f&stat=instructions:u) |
| 37 | + |
| 38 | +| | mean | max | count | |
| 39 | +|:----------:|:----:|:---:|:-----:| |
| 40 | +| Regressions πΏ <br /> (primary) | 0.5% | 0.8% | 13 | |
| 41 | +| Regressions πΏ <br /> (secondary) | 0.7% | 1.1% | 20 | |
| 42 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 43 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 44 | +| All πΏπ (primary) | 0.5% | 0.8% | 13 | |
| 45 | +- Slowdowns are happening in MIR borrow checking which this PR directly changes, so regressions are not surprising. |
| 46 | +- An issue should be opened to look into whether this can be improved. |
| 47 | +- [A comment](https://github.com/rust-lang/rust/pull/98145#issuecomment-1189186166) was left asking for a follow up. |
| 48 | + |
| 49 | + |
| 50 | +Rollup of 5 pull requests [#99210](https://github.com/rust-lang/rust/pull/99210) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=42bd138126b0a9d38d65bc9973e72de3c5b6c37f&end=c80dde43f992f3eb419899a34551b84c6301f8e8&stat=instructions:u) |
| 51 | + |
| 52 | +| | mean | max | count | |
| 53 | +|:----------:|:----:|:---:|:-----:| |
| 54 | +| Regressions πΏ <br /> (primary) | 2.6% | 4.5% | 7 | |
| 55 | +| Regressions πΏ <br /> (secondary) | 1.6% | 4.1% | 55 | |
| 56 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 57 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 58 | +| All πΏπ (primary) | 2.6% | 4.5% | 7 | |
| 59 | +- Seems the issue comes from calling an LLVM API more often due to needing to have unstable feature information kept around longer for use with the `asm!` macro. |
| 60 | +- Ran a cachegrind diff and found that the likely culprit is [#99155](https://github.com/rust-lang/rust/pull/99155) calling `LLVMRustHasFeature` more often. |
| 61 | +- [Left a comment](https://github.com/rust-lang/rust/pull/99210#issuecomment-1189222172) asking for a follow up. |
| 62 | + |
| 63 | + |
| 64 | +Rollup of 5 pull requests [#99231](https://github.com/rust-lang/rust/pull/99231) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=0ed9c64c3e63acac9bd77abce62501696c390450&end=f1a8854f9be2e5cad764d630a53d26c7b72f8162&stat=instructions:u) |
| 65 | + |
| 66 | +| | mean | max | count | |
| 67 | +|:----------:|:----:|:---:|:-----:| |
| 68 | +| Regressions πΏ <br /> (primary) | 1.2% | 3.2% | 117 | |
| 69 | +| Regressions πΏ <br /> (secondary) | 1.7% | 6.4% | 35 | |
| 70 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 71 | +| Improvements π <br /> (secondary) | -0.3% | -0.3% | 1 | |
| 72 | +| All πΏπ (primary) | 1.2% | 3.2% | 117 | |
| 73 | +- It's very hard to tell which PR might be responsible. Luckily, there are only 5 PRs in total so it should be possible to track the issue down. |
| 74 | +- [Left a comment](https://github.com/rust-lang/rust/pull/99231#issuecomment-1189372635) suggesting as much. |
| 75 | + |
| 76 | + |
| 77 | +Support unstable moves via stable in unstable items [#95956](https://github.com/rust-lang/rust/pull/95956) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=f1a8854f9be2e5cad764d630a53d26c7b72f8162&end=24699bcbadff59693a89a5184afed87f6416cdea&stat=instructions:u) |
| 78 | + |
| 79 | +| | mean | max | count | |
| 80 | +|:----------:|:----:|:---:|:-----:| |
| 81 | +| Regressions πΏ <br /> (primary) | 0.5% | 0.9% | 13 | |
| 82 | +| Regressions πΏ <br /> (secondary) | 0.6% | 1.2% | 10 | |
| 83 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 84 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 85 | +| All πΏπ (primary) | 0.5% | 0.9% | 13 | |
| 86 | +- The change seems to be localized to incremental compilation scenarios. |
| 87 | +- It seems queries like `incr_comp_encode_dep_graph` are being hit more often. I'm unsure whether this is simply because of the additional pass that's happening or something else. |
| 88 | +- [Left a comment](https://github.com/rust-lang/rust/pull/95956#issuecomment-1189256819) asking for more insight. |
| 89 | + |
| 90 | + |
| 91 | +Rollup of 10 pull requests [#99346](https://github.com/rust-lang/rust/pull/99346) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=7210e46dc69a4b197a313d093fe145722c248b7d&end=d5e7f4782e4b699728d0a08200ecd1a54d56a85d&stat=instructions:u) |
| 92 | + |
| 93 | +| | mean | max | count | |
| 94 | +|:----------:|:----:|:---:|:-----:| |
| 95 | +| Regressions πΏ <br /> (primary) | 0.6% | 2.6% | 136 | |
| 96 | +| Regressions πΏ <br /> (secondary) | 1.0% | 5.8% | 100 | |
| 97 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 98 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 99 | +| All πΏπ (primary) | 0.6% | 2.6% | 136 | |
| 100 | +- Regression was found [in #98582](https://github.com/rust-lang/rust/pull/98582) and will be reverted [in #99368](https://github.com/rust-lang/rust/pull/99368) or a follow up. |
| 101 | + |
| 102 | + |
| 103 | +Use ICF (identical code folding) for building rustc [#99062](https://github.com/rust-lang/rust/pull/99062) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=263edd43c5255084292329423c61a9d69715ebfa&end=246f66a905c2815f2c9b9c3d6b1e0649f3360ef8&stat=instructions:u) |
| 104 | + |
| 105 | +| | mean | max | count | |
| 106 | +|:----------:|:----:|:---:|:-----:| |
| 107 | +| Regressions πΏ <br /> (primary) | 0.3% | 0.4% | 2 | |
| 108 | +| Regressions πΏ <br /> (secondary) | 2.6% | 2.6% | 3 | |
| 109 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 110 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 111 | +| All πΏπ (primary) | 0.3% | 0.4% | 2 | |
| 112 | +- Small performance changes and some wins for binary size. |
| 113 | +- Asked in the PR whether [this can be marked as triaged](https://github.com/rust-lang/rust/pull/99062#issuecomment-1189293635). |
| 114 | + |
| 115 | + |
| 116 | +#### Improvements |
| 117 | + |
| 118 | +gather body owners [#98203](https://github.com/rust-lang/rust/pull/98203) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=1ba1fec234d07f43765c3c65ac341a4e64fb911a&end=30243dd87e7dbd17d68e1a1d16ba066a7d2cebe5&stat=instructions:u) |
| 119 | + |
| 120 | +| | mean | max | count | |
| 121 | +|:----------:|:----:|:---:|:-----:| |
| 122 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 123 | +| Regressions πΏ <br /> (secondary) | 0.6% | 0.6% | 1 | |
| 124 | +| Improvements π <br /> (primary) | -0.4% | -0.7% | 30 | |
| 125 | +| Improvements π <br /> (secondary) | -0.5% | -0.8% | 18 | |
| 126 | +| All πΏπ (primary) | -0.4% | -0.7% | 30 | |
| 127 | + |
| 128 | + |
| 129 | +interpret: get rid of MemPlaceMeta::Poison [#99013](https://github.com/rust-lang/rust/pull/99013) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=522abf6d88a45f9f49a1b2217426eef1c3a09b52&end=6077b7cda466afa2b75a62b232ab46dbeb148bcb&stat=instructions:u) |
| 130 | + |
| 131 | +| | mean | max | count | |
| 132 | +|:----------:|:----:|:---:|:-----:| |
| 133 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 134 | +| Regressions πΏ <br /> (secondary) | 0.5% | 0.5% | 1 | |
| 135 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 136 | +| Improvements π <br /> (secondary) | -1.6% | -2.5% | 12 | |
| 137 | +| All πΏπ (primary) | N/A | N/A | 0 | |
| 138 | + |
| 139 | + |
| 140 | +stop using `FnCtxt` outside of hir typeck [#99015](https://github.com/rust-lang/rust/pull/99015) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=0fe5390a885eb47f506bf481cd9ea2b449705d79&end=23e21bdd25026e2839ebe946c2a937c1904887d2&stat=instructions:u) |
| 141 | + |
| 142 | +| | mean | max | count | |
| 143 | +|:----------:|:----:|:---:|:-----:| |
| 144 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 145 | +| Regressions πΏ <br /> (secondary) | N/A | N/A | 0 | |
| 146 | +| Improvements π <br /> (primary) | -0.6% | -0.9% | 11 | |
| 147 | +| Improvements π <br /> (secondary) | -0.4% | -0.6% | 11 | |
| 148 | +| All πΏπ (primary) | -0.6% | -0.9% | 11 | |
| 149 | + |
| 150 | + |
| 151 | +Use constant eval to do strict mem::uninit/zeroed validity checks [#99033](https://github.com/rust-lang/rust/pull/99033) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=c2ecd3af87477147695aa3f6e1237e3185044e62&end=263edd43c5255084292329423c61a9d69715ebfa&stat=instructions:u) |
| 152 | + |
| 153 | +| | mean | max | count | |
| 154 | +|:----------:|:----:|:---:|:-----:| |
| 155 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 156 | +| Regressions πΏ <br /> (secondary) | N/A | N/A | 0 | |
| 157 | +| Improvements π <br /> (primary) | N/A | N/A | 0 | |
| 158 | +| Improvements π <br /> (secondary) | -2.2% | -2.9% | 6 | |
| 159 | +| All πΏπ (primary) | N/A | N/A | 0 | |
| 160 | + |
| 161 | + |
| 162 | +`replace_bound_vars` fast path: check predicates, don't check consts [#99232](https://github.com/rust-lang/rust/pull/99232) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=9ed0bf9f2bd63933785fb8a380c177d2d70e88ec&end=144227dae949fb98896a2ba077d8fe7f36c3238e&stat=instructions:u) |
| 163 | + |
| 164 | +| | mean | max | count | |
| 165 | +|:----------:|:----:|:---:|:-----:| |
| 166 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 167 | +| Regressions πΏ <br /> (secondary) | N/A | N/A | 0 | |
| 168 | +| Improvements π <br /> (primary) | -0.6% | -0.7% | 6 | |
| 169 | +| Improvements π <br /> (secondary) | N/A | N/A | 0 | |
| 170 | +| All πΏπ (primary) | -0.6% | -0.7% | 6 | |
| 171 | + |
| 172 | + |
| 173 | +#### Mixed |
| 174 | + |
| 175 | +Stop keeping metadata in memory before writing it to disk [#96544](https://github.com/rust-lang/rust/pull/96544) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=c2f428d2f3340a0e7d995f4726223db91b93704c&end=1ba1fec234d07f43765c3c65ac341a4e64fb911a&stat=instructions:u) |
| 176 | + |
| 177 | +| | mean | max | count | |
| 178 | +|:----------:|:----:|:---:|:-----:| |
| 179 | +| Regressions πΏ <br /> (primary) | N/A | N/A | 0 | |
| 180 | +| Regressions πΏ <br /> (secondary) | 0.3% | 0.4% | 3 | |
| 181 | +| Improvements π <br /> (primary) | -0.3% | -0.3% | 1 | |
| 182 | +| Improvements π <br /> (secondary) | -4.1% | -4.1% | 2 | |
| 183 | +| All πΏπ (primary) | -0.3% | -0.3% | 1 | |
| 184 | +- The perf here is a wash. |
| 185 | + |
| 186 | + |
| 187 | +Final derive output improvements [#99046](https://github.com/rust-lang/rust/pull/99046) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=116819f54f062a2f425deac4ec29245038c26613&end=0fe5390a885eb47f506bf481cd9ea2b449705d79&stat=instructions:u) |
| 188 | + |
| 189 | +| | mean | max | count | |
| 190 | +|:----------:|:----:|:---:|:-----:| |
| 191 | +| Regressions πΏ <br /> (primary) | 0.5% | 0.6% | 8 | |
| 192 | +| Regressions πΏ <br /> (secondary) | N/A | N/A | 0 | |
| 193 | +| Improvements π <br /> (primary) | -0.6% | -0.9% | 19 | |
| 194 | +| Improvements π <br /> (secondary) | -2.8% | -3.7% | 6 | |
| 195 | +| All πΏπ (primary) | -0.2% | -0.9% | 27 | |
| 196 | +- Improvements much outweigh the regressions as [noted here](https://github.com/rust-lang/rust/pull/99046#issuecomment-1186032948). |
| 197 | + |
| 198 | +proc_macro/bridge: stop using a remote object handle for proc_macro Ident and Literal [#98189](https://github.com/rust-lang/rust/pull/98189) [(Comparison Link)](https://perf.rust-lang.org/compare.html?start=96c2df810b0b681fee63cae11ca63844792b6190&end=c3f35504d15e80b4727872c17c8c2f4bbaee58cf&stat=instructions:u) |
| 199 | + |
| 200 | +| | mean | max | count | |
| 201 | +|:----------:|:----:|:---:|:-----:| |
| 202 | +| Regressions πΏ <br /> (primary) | 1.0% | 2.2% | 4 | |
| 203 | +| Regressions πΏ <br /> (secondary) | N/A | N/A | 0 | |
| 204 | +| Improvements π <br /> (primary) | -0.7% | -1.7% | 19 | |
| 205 | +| Improvements π <br /> (secondary) | -3.0% | -3.1% | 3 | |
| 206 | +| All πΏπ (primary) | -0.4% | 2.2% | 23 | |
| 207 | +- Still more improvements than regressions, and this is an active area of performance work as [noted here](https://github.com/rust-lang/rust/pull/98189#issuecomment-1189240748). |
| 208 | + |
0 commit comments