[LLVMbugs] [Bug 22803] New: shared_ptr's increment/decrement uses sequential consistency.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Mar 5 05:07:16 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22803
Bug ID: 22803
Summary: shared_ptr's increment/decrement uses sequential
consistency.
Product: libc++
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: martin.horenovsky at gmail.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150305/a1bf8962/attachment.html>
More information about the llvm-bugs
mailing list