-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Inline bridge::Buffer
methods.
#97604
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
Inline bridge::Buffer
methods.
#97604
Conversation
This fixes a performance regression caused by making `Buffer` non-generic in rust-lang#97004.
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit dee353d with merge 96f4496f4f75f1e98a276af608d7b4a9a06fc333... |
This is an alternative to #97539. |
☀️ Try build successful - checks-actions |
Queued 96f4496f4f75f1e98a276af608d7b4a9a06fc333 with parent e094492, future comparison URL. |
Finished benchmarking commit (96f4496f4f75f1e98a276af608d7b4a9a06fc333): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
The CI perf results are similar enough to those in #97539. |
@bors r+ |
📌 Commit dee353d has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (cb0584f): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
@nnethercote I'm a bit confused as this PR was opened to address a performance regression, but it seems to be itself a partial perf regression (at least in instruction counts). This causes a near 4% perf regression in serde_derive-1.0.136. Granted that particular benchmark has been somewhat noisy but not nearly to the level seen here. Can you justify why this perf regression is acceptable and then label with the |
I'm confident the serde_derive regression is unrelated to this PR. It only happens on full opt builds, but this PR doesn't make any changes that affect code generation. If it was a genuine regression I would expect check and debug builds to also regress, and possibly the incremental scenarios. We occasionally see this kind of random fluctuation with opt builds. It's probably caused by a slight change in codegen unit partitioning. You can see on the graphs at perf.rust-lang.org that there was a similar drop for @rustbot label: +perf-regression-triaged |
@rylev I'm not even sure it's random, but rather anything that results in more intensive proc macro codegen for the benefit of the runtime performance (i.e. actually using the proc macro) will cause a "shift" in benchmarks, where:
If you look at the regression results it looks like a clear-cut regression, but that's just because I was going to claim that the asymmetry of relative % makes this more confusing, but that's more noticeable the closer you get to So maybe there is some noise, although this PR is clearly worse than #97539's perf run for
This PR adds
Also, just remembered that Cargo doesn't actually optimize proc macros so... how are we getting improvements from changes that should only matter if proc macros were getting optimized?! |
This fixes a performance regression caused by making
Buffer
non-generic in #97004.
r? @eddyb