You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current shared_ptr implementation uses sequential consistency for reference counting, even though less strong atomics are good enough. This leads to suboptimal performance for platforms other than x86 (x64).
Relaxed and acq/rel atomics (for increment and decrement respectively) should be sufficient for thread safety. The reason it is currently implemented like this was that Clang at the time didn't support full range of C++11 atomics and noone ever got back to cleaning it up.
The text was updated successfully, but these errors were encountered:
Current shared_ptr implementation uses sequential consistency for reference
counting, even though less strong atomics are good enough. This leads to
suboptimal performance for platforms other than x86 (x64).
Relaxed and acq/rel atomics (for increment and decrement respectively)
should be sufficient for thread safety. The reason it is currently
implemented like this was that Clang at the time didn't support full range
of C++11 atomics and noone ever got back to cleaning it up.
Hi;candecrement() use relaxed atomics?
llvmbot
transferred this issue from llvm/llvm-bugzilla-archive
Dec 9, 2021
Extended Description
Current shared_ptr implementation uses sequential consistency for reference counting, even though less strong atomics are good enough. This leads to suboptimal performance for platforms other than x86 (x64).
Relaxed and acq/rel atomics (for increment and decrement respectively) should be sufficient for thread safety. The reason it is currently implemented like this was that Clang at the time didn't support full range of C++11 atomics and noone ever got back to cleaning it up.
The text was updated successfully, but these errors were encountered: