[Patch] Speed up operator>>(istream, string)
Paolo Carlini
pcarlini@suse.de
Thu May 20 10:02:00 GMT 2004
Hi,
the below consistently improves operator>>(..., string) in the same way of
getline(..., string).
For a testcase identical to streams.cpp in 15002, besides 'f >> l' instead
of 'getline(f, l)', these are some numbers on my usual machine (on x86_64
the results are similar):
3.4.0
-----
9.090u 0.080s 0:09.22 99.4% 0+0k 0+0io 206pf+0w
3.4.1 pre
---------
3.470u 0.140s 0:03.81 94.7% 0+0k 0+0io 204pf+0w
3.4.1 pre + patch
-----------------
1.400u 0.110s 0:01.51 100.0% 0+0k 0+0io 205pf+0w
3.5 exp
-------
7.050u 0.090s 0:07.18 99.4% 0+0k 0+0io 208pf+0w
3.5 exp + patch
---------------
1.500u 0.080s 0:01.58 100.0% 0+0k 0+0io 209pf+0w
Icc8.0
------
2.770u 0.110s 0:02.89 99.6% 0+0k 0+0io 203pf+0w
As you can see, the code generated by unpatched mainline is not as good
as 3_4-branch: sadly, I'm seeing this rather often, for other performance
testcases in the iostreams area too.
Anyway, of course the patch would go in mainline only, for now, and I'm
also adding a couple of new testcases.
A will wait a few hours, in case of comments.
Regtested x86-linux.
Paolo.
///////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_operator
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040520/21d2e8a2/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_operator
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040520/21d2e8a2/attachment-0001.ksh>
More information about the Libstdc++
mailing list