This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Call for compiler help/advice: atomic builtins for v3
Paolo Carlini wrote:
>> And, that if
>>__exchange_and_add is showing up on the top of the profile, the fix
>>probably isn't inlining -- it's to work out a way to make less use of
>>atomic operations.
>>
>>
I want to add that we are certainly going in this direction, with a
non-refcounted string for the next library ABI, also available as an
extension, a preview for 4.1.
On the other hand, you cannot avoid atomic operations completely in the
library, and in some areas, for instance tr1::shared_ptr, it's really
the best you can use, using lock-free programming, to achieve MT-safety
and good performance.
Also, I think an user yesterday had a good point: we should also make
possible a configuration option enabling to build the library optimized
for single thread. To be fair, Gerald Pfeifer also suggested that a lot
of time ago...
Paolo.