-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make bridge::Buffer
generic again.
#97539
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
Make bridge::Buffer
generic again.
#97539
Conversation
It was made non-generic in rust-lang#97004, but that (surprisingly) caused a mild performance regression.
This comment was marked as off-topic.
This comment was marked as off-topic.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit b41ece9 with merge 2032e7bcf336d8021dd5ab28f20766209c37ea49... |
I'd have guessed the being non-generic was a performance regression because of the impact on cross-crate inlining, but all the changes here are in a single create 🤷 |
☀️ Try build successful - checks-actions |
Queued 2032e7bcf336d8021dd5ab28f20766209c37ea49 with parent 28b8919, future comparison URL. |
The type is used in generic code by the proc_macro server when specializing it for use by |
Finished benchmarking commit (2032e7bcf336d8021dd5ab28f20766209c37ea49): 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 |
r=me if this is acceptable, but @mystor's |
Which methods would need inlining? |
// `T` is always `u8` in practice. Attempts to remove `T` caused mild | ||
// performance regressions, surprisingly enough. |
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.
Actually, every fn
in this module might need #[inline]
(all 17 of them), so can you just edit the comment to say that without generics, #[inline]
would be needed everywhere to avoid performance regressions and r=me?
I tried the inlining approach and it gave slightly better performance, so I have opened #97604. |
It was made non-generic in #97004, but that (surprisingly) caused a mild
performance regression.
r? @eddyb