[Patch] Speedup locale::operator==
Paolo Carlini
pcarlini@suse.de
Wed Apr 14 16:47:00 GMT 2004
Hi,
I noticed some time ago that we (*) weren't exploting the ref-counted
nature of locale in operator==.
For this stupid testcase (P4-2400, -O2):
std::locale loc1("fr_FR");
std::locale loc2 = loc1;
bool test = false;
for (int i = 0; i < 10000000; ++i)
if (loc2 == loc1)
test = true;
current mainline
----------------
5.190u 0.000s 0:05.21 99.6% 0+0k 0+0io 245pf+0w
patched
-------
0.150u 0.000s 0:00.15 100.0% 0+0k 0+0io 242pf+0w
Regtested x86-linux, will commit later.
Paolo.
(*) At variance with our famous competitor ;) ...
//////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_locale
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040414/7fd573f1/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_locale
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040414/7fd573f1/attachment-0001.ksh>
More information about the Libstdc++
mailing list