ANDROID: rust: use Rust atomics for Arc refcount
Currently, the refcounting logic in Arc uses rust helpers to modify the
refcount. These extra method calls can be expensive, and are not always
removed even with cross-lang LTO. Instead, we reimplement them in Rust,
which enables rustc to inline these methods.
The Rust implementations are private to the `Arc` module, so they cannot
be used anywhere else.
Bug: 324206405
Change-Id: Ibf3bcb7ca493ae9dc96012c9b75630608ec96449
Signed-off-by:
Alice Ryhl <aliceryhl@google.com>
Loading
Please sign in to comment