[Patch] Nathan's improvements to basic_string

Paolo Carlini pcarlini@unitus.it
Wed Jun 18 20:34:00 GMT 2003


Nathan Myers wrote:

>Apologies for replying to my own post again; I have more numbers.
>
And what numbers!

>>A lock/add seems to cost 11.6 ns, or [16] cycles, on this hardware when 
>>there is no contention.  
>>    
>>
>I tried it with two threads on a dual Opteron.  With the patch the
>runtime was exactly the same as with one thread.  Without, it was
>from 20 to 50 times slower, and 4 to 10 times slower than with 
>one thread.
>
Astonishing, Nathan!

Thanks again for your contribution.
Paolo.



More information about the Libstdc++ mailing list