-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 small fns of futex RwLock
#98143
Conversation
The important methods like `read` and `write` were already inlined, which can propagate all the way to inlining in user code, but these small state functions were left behind as normal calls. They should almost always be inlined as well, as they're just a few instructions.
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7857709 with merge cabda343229712ffff529a0e5bd7dec209dfb169... |
☀️ Try build successful - checks-actions |
Queued cabda343229712ffff529a0e5bd7dec209dfb169 with parent 3bebee7, future comparison URL. |
Finished benchmarking commit (cabda343229712ffff529a0e5bd7dec209dfb169): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. 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. @bors rollup=never Footnotes |
LGTM @bors r+ rollup=never |
📌 Commit 7857709 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3cf1275): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
The important methods like
read
andwrite
were already inlined,which can propagate all the way to inlining in user code, but these
small state functions were left behind as normal calls. They should
almost always be inlined as well, as they're just a few instructions.