Commit c6c6be80 authored by Alice Ryhl's avatar Alice Ryhl
Browse files

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: default avatarAlice Ryhl <aliceryhl@google.com>
parent 282b78ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment