This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Reduce libstdc++-v3 locale::locale() lock contention
- From: Jimmy Guo <jguo at yahoo-inc dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 17 Dec 2009 12:11:31 -0800
- Subject: Re: Reduce libstdc++-v3 locale::locale() lock contention
>> Yes you are right. Cannot do this without ABI breakage. The old object
>> handling destruction will cause problem.
>>
> Yeah, I also think so, unfortunately :( Would improve the performance a
> lot, eh? Any idea how much?
Indeed a lot ... so tempted to apply this to my custom gcc and ask all of
our affected projects to rebuild their libraries ...
a. Current:
nthreads = 1: 1585
nthreads = 2: 4501
nthreads = 4: 26203
nthreads = 8: 31745
b. locale::locale() lock contention reduction:
nthreads = 1: 1237
nthreads = 2: 2028
nthreads = 4: 8371
nthreads = 8: 21262
c. 'b' + C locale ref counting removal:
nthreads = 1: 1159
nthreads = 2: 1523
nthreads = 4: 1742
nthreads = 8: 1902
- Jimmy