Uh oh!
There was an error while loading. Please reload this page.
Optimize RcInnerPtr::inc_strong()/inc_weak() instruction count - #95224
Conversation
Inspired by this internals thread: https://internals.rust-lang.org/t/rc-optimization-on-64-bit-targets/16362 [The generated assembly is a bit smaller](https://rust.godbolt.org/z/TeTnf6144) and is a more efficient usage of the CPU's instruction cache. `unlikely` doesn't impact any of the small artificial tests I've done, but I've included it in case it might help more complex scenarios when this is inlined.
rust-highfive
commented
Mar 23, 2022
r? @yaahc (rust-highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yaahc
commented
Apr 12, 2022
Looks great, thank you for the PR! @bors r+ |
bors
commented
Apr 12, 2022
📌 Commit 8d14c03 has been approved by |
Optimize RcInnerPtr::inc_strong()/inc_weak() instruction count Inspired by this internals thread: https://internals.rust-lang.org/t/rc-optimization-on-64-bit-targets/16362 [The generated assembly is a bit smaller](https://rust.godbolt.org/z/TeTnf6144) and is a more efficient usage of the CPU's instruction cache. `unlikely` doesn't impact any of the small artificial tests I've done, but I've included it in case it might help more complex scenarios when this is inlined.
Mark-Simulacrum
commented
Apr 15, 2022
@bors rollup=never |
bors
commented
Apr 15, 2022
⌛ Testing commit 8d14c03 with merge 78bca4dd0d02b7d3ec42f55ff0511b4a7894811d... |
Dylan-DPC
commented
Apr 15, 2022
@bors retry (letting rollup go first since queue is long) |
rust-log-analyzer
commented
Apr 15, 2022
bors
commented
Apr 15, 2022
⌛ Testing commit 8d14c03 with merge 2761af47284e3ef7ac9a027a40e98da242fb60ac... |
Mark-Simulacrum
commented
Apr 15, 2022
@bors retry -- gha-self-hosted restart |
rust-log-analyzer
commented
Apr 15, 2022
bors
commented
Apr 15, 2022
bors
commented
Apr 16, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Apr 16, 2022
Finished benchmarking commit (bb1a03c): comparison url. Summary:
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 |
pnkfelix
commented
Apr 21, 2022
@rustbot label: +perf-regression-triaged |
Inspired by this internals thread: https://internals.rust-lang.org/t/rc-optimization-on-64-bit-targets/16362
The generated assembly is a bit smaller and is a more efficient usage of the CPU's instruction cache.
unlikelydoesn't impact any of the small artificial tests I've done, but I've included it in case it might help more complex scenarios when this is inlined.