mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-11 22:43:42 +00:00
bb1a03c4fc
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. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |