Serious performance problems
Colin Fox
cfox@crystalcherry.com
Fri Jul 13 01:21:00 GMT 2001
Greetings.
I've installed (in test directories) gcc3.0 and the 3.0 stdc++ library.
Just out of curiosity, I did a performance test against the old compiler
I was using (2.96).
My quick tests seem to indicate a 30x slowdown in the new iostreams.
This program:
-----------------------
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
cin >> cout.rdbuf();
}
-----------------------
Runs with these times on my celeron 500 (the bigtest.txt file is about a
megabyte long). the t4_30 program is the gcc3.0 compiled version. t4 is
the gcc 2.96 version.
[cfox@elgrande perf]$ time ./t4_30 <bigtest.txt >/dev/null
real 0m9.430s
user 0m6.660s
sys 0m2.720s
[cfox@elgrande perf]$ time ./t4 <bigtest.txt >/dev/null
real 0m0.268s
user 0m0.250s
sys 0m0.020s
This is alarming, to say the least. Is this a known issue? If not,
what's the correct way to report this?
Thanks for your time!
--
Colin Fox
CF Consulting Inc.
cfox@crystalcherry.com
More information about the Libstdc++
mailing list