Uh oh!
There was an error while loading. Please reload this page.
Remove layout::size_align. - #72189
Conversation
rust-highfive
commented
May 14, 2020
r? @kennytm (rust_highfive has picked a reviewer for you, use r? to override) |
nnethercote
commented
May 14, 2020
r? @ghost |
nnethercote
commented
May 14, 2020
I was getting weird perf results with this trivial change locally, so I'm going to do a perf CI run. @bors try @rust-timer queue |
rust-timer
commented
May 14, 2020
Awaiting bors try build completion |
bors
commented
May 14, 2020
⌛ Trying commit bf8ab30732fe02fa27ef69db654830e0802320e6 with merge e394819560f57a7fd5628b99e3e6d5b5d85dfeab... |
bors
commented
May 14, 2020
☀️ Try build successful - checks-actions, checks-azure |
rust-timer
commented
May 14, 2020
Queued e394819560f57a7fd5628b99e3e6d5b5d85dfeab with parent 23ffeea, future comparison URL. |
rust-timer
commented
May 14, 2020
Finished benchmarking try commit e394819560f57a7fd5628b99e3e6d5b5d85dfeab, comparison URL. |
nnethercote
commented
May 14, 2020
These results are so weird for such a trivial change.
I will investigate further. |
nnethercote
commented
May 15, 2020
First, let's look at the improvement in The -452M for Looking at becoming this: Notice the -452M for the Encoding/decoding certainly dominates that benchmark run. Here are Cachegrind results without this PR's patch applied: Perhaps the lesson here is this: because encoding/decoding code dominates the execution time of these runs, therefore minor changes in inlining and code generation of that code occasionally has outsized effects? Also, this is a really weird benchmark. We don't normally see encoding/decoding anything like that dominant. |
nnethercote
commented
May 15, 2020
As for the big
After:
The number of executions of some of the queries drops from 166 to 65. All other query counts are either identical or almost identical between the runs. I don't know why the number of queries would change so drastically. Any suggestions? |
Mark-Simulacrum
commented
May 15, 2020
The LTO query changes are probably different CGU partitioning, cc @rust-lang/wg-mir-opt |
nnethercote
commented
May 15, 2020
Now for The regression is clearly all to do with metadata encoding. I see these results for the old code: and new: There are much higher counts for all the function entries/exits in the new code, so this definitely looks like inlining effects. I barely understand the encoding code but presumably it's writing stuff into vectors, which would explain how |
nnethercote
commented
May 15, 2020
Now for Old code: New code:
|
nnethercote
commented
May 15, 2020
In general, it seems like the growth path for |
nnethercote
commented
May 15, 2020
I was able to replicate the |
nnethercote
commented
May 15, 2020
Also, this is a case where instruction counts are misleading. The instruction count improvement was 38%, but on CI the wall-time improvement was only 7.8%, and on my machine it was only 2.6%. Presumably this relates to the fact that LLVM codegen is multi-threaded. |
Mark-Simulacrum
commented
May 15, 2020
Yes -- CGU partitioning is intended to be deterministic on the set of inputs (and even under some changes, for incremental) but we've historically seen that it can be quite prone to shifts when altering underlying functions. See rust-lang/compiler-team#281 for a recent meeting proposal. |
wesleywiser
commented
May 15, 2020
The |
nnethercote
commented
May 29, 2020
Let's try this again, to see if anything has changed. @bors try @rust-timer queue |
rust-timer
commented
May 29, 2020
Awaiting bors try build completion |
bors
commented
May 29, 2020
⌛ Trying commit bf8ab30732fe02fa27ef69db654830e0802320e6 with merge f2dd1363e1fd146df330d259407f731150074f05... |
bors
commented
May 29, 2020
☀️ Try build successful - checks-azure |
rust-timer
commented
May 29, 2020
Queued f2dd1363e1fd146df330d259407f731150074f05 with parent 4512721, future comparison URL. |
nnethercote
commented
Jul 24, 2020
This isn't going anywhere. |
5d95e14 to
423615aCompare423615a to
086cecbComparennethercote
commented
Jul 28, 2020
Let's give it one more try. @bors try @rust-timer queue |
rust-timer
commented
Jul 28, 2020
Awaiting bors try build completion |
bors
commented
Jul 28, 2020
⌛ Trying commit 086cecb with merge 57ad04fc500e914cfa0d54b97a7e879f751b1a17... |
bors
commented
Jul 28, 2020
☀️ Try build successful - checks-actions, checks-azure |
rust-timer
commented
Jul 28, 2020
Queued 57ad04fc500e914cfa0d54b97a7e879f751b1a17 with parent 1f5d69d, future comparison URL. |
rust-timer
commented
Jul 28, 2020
Finished benchmarking try commit (57ad04fc500e914cfa0d54b97a7e879f751b1a17): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
nnethercote
commented
Jul 28, 2020
Still terrible results. |
Make `Layout::new::<T>()` a constant instead of multiple NullOps rust-lang#72189 and rust-lang#79827 suggest that this is perf-relevant, so let's see what happens. r? ghost
No description provided.