This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/9606: performance regression in operator<<(ostream&,int)
- From: jbuck at synopsys dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 6 Feb 2003 23:44:56 -0000
- Subject: libstdc++/9606: performance regression in operator<<(ostream&,int)
- Reply-to: jbuck at synopsys dot com
>Number: 9606
>Category: libstdc++
>Synopsis: performance regression in operator<<(ostream&,int)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 06 23:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Joe Buck
>Release: gcc-3.2.1 (actually, all gcc-3.x releases)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Compile and run the test program below with
g++ -O3 prog.C -o prog
and time it. For gcc 3.2.1 on a Xeon 2.2 GHz box,
it takes 17.39 sec, but for gcc 2.95.3, it takes
2.06 sec.
It seems that the difference is that snprintf is
now used.
>How-To-Repeat:
// this is the test program.
#include <fstream>
int main(int argc, char** argv) {
std::ofstream sink("/dev/null");
for (int i = 0; i < 10000000; i++)
sink << i;
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: