This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/7076: iostreams very slow compared with earlier gcc versions
- From: morten at wtf dot dk
- To: gcc-gnats at gcc dot gnu dot org
- Date: 19 Jun 2002 12:39:55 -0000
- Subject: libstdc++/7076: iostreams very slow compared with earlier gcc versions
- Reply-to: morten at wtf dot dk
>Number: 7076
>Category: libstdc++
>Synopsis: iostreams very slow compared with earlier gcc versions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 19 05:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Morten Brix Pedersen
>Release: gcc-3.1
>Organization:
>Environment:
>Description:
'cout' is very slow in g++ 3.1 compared with g++ 2.95.4 (Debian prerelease).
My results with 'time', gcc 2.95.4:
mbp:~/testcode$ time ./stream > /dev/null
real 0m1.886s
user 0m0.940s
sys 0m0.000s
My results with gcc 3.1.0:
mbp:~/testcode$ time ./stream-3.1 > /dev/null
real 0m37.636s
user 0m18.520s
sys 0m0.010s
>How-To-Repeat:
#include <iostream>
int main(int argc, char** argv)
{
for(int i=0; i< 1500000; i++)
std::cout << i << '\n';
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: