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: stringstream slowness


Radu Grigore wrote:

A program like the following works about 3 times faster when compiled
with VS7.1, compared to gcc3.3.1. The optimizations are turned on (-O2
for gcc and "release" mode for VS).

Hi Radu.

Any chance you can test gcc3.4.0 or the forthcoming gcc3.4.1? In the
3.4 series we have many performance improvements in this area.

Indeed, on my P4-2400, this version of your snippet:

...
 string v[500000];

 for (unsigned i = 0; i < 500000; ++i)
   v[i] = "100 200 300 400 500";
...

Gives these numbers for me:

3.3.3
-----
5.640u 0.030s 0:05.68 99.8%     0+0k 0+0io 213pf+0w

3.4.0
-----
1.500u 0.060s 0:01.58 98.7%     0+0k 0+0io 200pf+0w


Thanks for your message, Paolo.


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