-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add #[inline] to trivial AsRef/AsMut impls #94372
Conversation
These appeared uninlined in some perf runs, but they're trivial.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 4194d75 with merge cf7838d4076c630a0ff2ad5a8acf6ee148956056... |
☀️ Try build successful - checks-actions |
Queued cf7838d4076c630a0ff2ad5a8acf6ee148956056 with parent d981633, future comparison URL. |
Finished benchmarking commit (cf7838d4076c630a0ff2ad5a8acf6ee148956056): comparison url. Summary: This benchmark run shows 13 relevant improvements 🎉 to instruction counts.
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 led to changes in compiler perf. @bors rollup=never |
It's interesting that inline helps even on generic methods. |
A small but consistent win. r? rust-lang/compiler |
I was wondering if someone would comment that :P It is true that generic functions are codegen'd in downstream crates (without But |
That's right. One thing to keep in mind is that downstream crates are often compiled with multiple codegen units, so even though a generic function will have its own downstream instantiation, it might still not be available for inlining in all except one of the codegen units. On the other hand ThinLTO takes care of this pretty reliably for small functions, so I suspect the additional Since this is in libcore: r? rust-lang/libs |
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.
Thanks!
@bors r+ |
📌 Commit 4194d75 has been approved by |
⌛ Testing commit 4194d75 with merge 90f79882992b98ddba920ab7da0175a63df55346... |
💔 Test failed - checks-actions |
x86_64-apple-2 failed with no indication why. @bors retry |
⌛ Testing commit 4194d75 with merge 2947c05ec6c442c1790f86fe0aa04d3815362b9a... |
💔 Test failed - checks-actions |
@bors retry dist-x86_64-apple-alt was cancelled after running 1.5 hours. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f2661cf): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
…, r=bjorn3 Revert part of rust-lang#94372 to improve performance rust-lang#94732 was supposed to give small but widespread performance improvements, as judged from three per-merge performance runs. But the performance run that occurred after merging included a roughly equal number of improvements and regressions, for unclear reasons. This PR is for a test run reverting those changes, to see what happens. r? `@ghost`
These appeared uninlined in some perf runs, but they're trivial.
r? @ghost