-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small perf regression in #69635 #69710
Comments
The perf results for #69241, the original revert of #67174, are basically the mirror of the regression mentioned above. #67220, the first rollup to include #67174, also caused a performance regression, but it was attributed to a different PR in that rollup. Therefore, I'm confident that #67174/#69544 is the root cause of this regression. #69679 suggests that the optimizer does not benefit from being able to assume that the addition at the start of In any case, this seems like it should interest @nnethercote, since it indicates that the code in |
Here is some output from a Callgrind profile that I had lying around. This is for a
It suggests two things:
I can do a proper analysis tomorrow if that would be helpful. That will likely involve running Cachegrind on But it might just be simpler to revert the change again? First it caused miscompilation, then it caused a perf regression... maybe this code should just be left alone :) |
I'll open a PR that reverts #69544. I'd like to spend some time investigating it as well, since I have no idea why this would affect performance and it seems like a good opportunity to learn. If you feel the urge to look into this, however, don't let me stop you! I'll be pretty slow. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rust-timer build 4bfc61c90b9066ee396739e074d6d05abcfda04e |
Queued 4bfc61c90b9066ee396739e074d6d05abcfda04e with parent c79f5f0, future comparison URL. |
For anyone who's curious, here are the results of
No idea how to attribute this. Maybe it's worth noting that
|
The Cachegrind diff basically says that the (BTW, I usually run Cachegrind with |
Finished benchmarking try commit 4bfc61c90b9066ee396739e074d6d05abcfda04e, comparison URL. |
The different performance might be strictly about the fact that a different It would be interesting to test compile time with different core but exactly |
Rerevert "Remove checked_add in Layout::repeat" This change, which originated in #67174 and was reapplied in #69544, seems to have caused a noticeable slowdown in patched/clean incremental builds (see #69710). Revert it for now while we investigate the underlying issue. r? @nnethercote
The regression ultimately disappeared after #69879 (likely #69799). @TimDiekmann It appears that minor changes to innocent-looking code in |
The next upcoming refactoring of |
As far as I can tell, there is nothing really actionable left in this issue, so I'm going to close it. |
#69635 (a rollup) caused a small performance regression. Since the regression has persisted through the last half dozen perf runs, it is likely not spurious. There are no outstanding perf runs near the regression (2020-03-02), so I am fairly confident in this attribution. That rollup consists of the following PRs:
checked_add
inLayout::repeat
" #69544 (Unrevert "Removechecked_add
inLayout::repeat
")syntax
in librustc_ast/README.md #69622 (Renamesyntax
in librustc_ast/README.md)I would not expect any of them to negatively impact performance, although I did do a perf run with an
unchecked_add
inLayout::repeat
to no avail (see #69679). The regression is only noticeable in clean/patched incremental builds, so I don't think this is high priority, but it would be nice to know what's going on here.cc @nnethercote @jonas-schievink @Mark-Simulacrum
The text was updated successfully, but these errors were encountered: