-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
perf: Remove inline attribute from into_vec()
#71204
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit c2f24a1 with merge 29ffb19116621fbf5394f1486b63a50c529493c5... |
indeed, adding an Lines 38 to 48 in 4e4d49d
|
☀️ Try build successful - checks-azure |
Queued 29ffb19116621fbf5394f1486b63a50c529493c5 with parent 4e4d49d, future comparison URL. |
Finished benchmarking try commit 29ffb19116621fbf5394f1486b63a50c529493c5, comparison URL. |
@wesleywiser How about --^? |
Wow! That's definitely the cause of the @bors r+ rollup=never p=1 This fixes an unintended performance regression so I'm bumping the priority so that we see if we need to continue investigating sooner. |
📌 Commit c2f24a1 has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit c2f24a1 has been approved by |
@bors retry |
@@ -140,7 +140,6 @@ mod hack { | |||
use crate::string::ToString; | |||
use crate::vec::Vec; | |||
|
|||
#[inline] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment explaining that this is deliberately non-inline
and pointing to the perf results in this PR. Otherwise, someone is inadvertently going to add the attribute back in a year or two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, will do!
☀️ Test successful - checks-azure |
Explain why we shouldn't add inline attr to into_vec Follow-up of rust-lang#71204 r? @RalfJung
Explain why we shouldn't add inline attr to into_vec Follow-up of rust-lang#71204 r? @RalfJung
Explain why we shouldn't add inline attr to into_vec Follow-up of rust-lang#71204 r? @RalfJung
Came here from the post-merge perf results for this PR. I spotted it as the first of the two small post-stabilization regressions in the "clean" runs in this graph. Sadly the original speedup is before the stabilization so we can't just see it. |
So you are saying, while https://perf.rust-lang.org/compare.html?start=4e4d49d60fd696c4036d438292673a2d7fd34519&end=29ffb19116621fbf5394f1486b63a50c529493c5 says this is a speed-up, weirdly that graph shows it as a slow-down? |
@RalfJung What you linked has 7 regressions of at least 1.0%, and only 3 speedups. What's sad is that we can't see the original change that would have roughly the opposite effect (7 speedups and 3 regressions), on graphs, because it happened before the noise was dealt with. |
Fair, but the green numbers are bigger than the red ones. I don't have any stakes in this. But a discussion in an already merged PR is likely to be lost, so IMO if you think something should happen, we should open an issue or just revert the PR or so? |
@RalfJung The results are entirely expected as per #71204 (comment). What I was commenting on is that we can't see how a bunch of crates were marginally sped up in the previous change, with the speed-up being reversed by this PR, because we only fixed the variance halfway in between, so the original change is lost in noise. There's really nothing to do here, this PR isn't a regression to the state before the original change. Sorry I wasn't clear enough in my drive-by comment. |
Oh I see, thanks for clarifying. :) |
It was introduced in #70565 and is likely related to this perf results: https://perf.rust-lang.org/compare.html?start=1edcfc83c6a08ddc5e63fc652b149baea0236e7c&end=d249d756374737eb014079901ac132f1e1ed905e&stat=instructions:u
Let's check if it's related to that.
r? @wesleywiser could you kick off perf check? I don't think I can do it.