exchange_and_add inlined in g++ 4.0.2
Paolo Carlini
pcarlini@suse.de
Sun Nov 6 01:09:00 GMT 2005
Hi,
>My three questions are:
>
> 1) Is it really a problem that __gnu_cxx::__exchange_and_add are
>non-inlined?
>
This problem dates back to february, 2004:
http://gcc.gnu.org/ml/libstdc++/2004-02/msg00372.html
and we really hoped the performance would not be measurably affected...
You say "appear in the profile", indeed, I can confirm that recently I
saw it myself quite a few times, but I wonder whether it's very high in
your profile or not, can you quantify?
> 3) the pdns_recursor is single threaded so I don't actually want
>"exchange and add" to be anything special, ie, it need not be atomic. Is
>that possible for std::string? Would it mattter?
>
>
This is a very reasonable request, in my opinion. Actually, I considered
briefly that issue some time ago, then got distracted, unfortunately.
Can you possibly file a complete Bugzilla PR describing this enhancement
request? You can also put there, immediately, or afterwards, any
additional info as per the point above.
Thanks a lot,
Paolo.
More information about the Libstdc++
mailing list