This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Nathan's improvements to basic_string


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]