This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Call for compiler help/advice: atomic builtins for v3
Mark Mitchell wrote:
>Richard Henderson wrote:
>
>>I believe some poor design decisions were made for p4 here. But even
>>on a platform without such problems you can expect a factor of 30
>>difference.
>>
>>
>So, that suggests that inlining these operations probably isn't very
>profitable. In that case, it seems like we could put these routines
>into libgcc, and just have libstdc++ call them. 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.
>
>
Indeed, I was about to reply to Richard the very same things. If we are
really sure that there is not much to gain from inlining (*), then the
libgcc idea is still valid, even more so, in a sense I care a lot:
working on the library will be *so* nice and the code so *clean*!
Paolo.
(*) You may dig some numbers from this thread:
http://gcc.gnu.org/ml/libstdc++/2004-02/msg00372.html
where I had to agree that we didn't give away too much performance.
Still, it's measurable.