public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9111: gcc 3.0.4 slow run time reults
@ 2002-12-31 4:52 paolo
0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2002-12-31 4:52 UTC (permalink / raw)
To: dita, gcc-bugs, gcc-prs, nobody
Synopsis: gcc 3.0.4 slow run time reults
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Tue Dec 31 04:52:35 2002
State-Changed-Why:
This is by and large a known issue (see libstdc++/7076 and
some recent postings on the list).
However, for the time being, could you possibly try:
1- Upgrading to gcc3.2.1
2- Putting std::ios::sync_with_stdio(false); at the
beginning of your test.
On i686-pc-linux-gnu, I'm getting the followin run times
for HelloWorld2.cc (-O2 > /dev/null):
3.0.4: 8.190u 4.440s 0:12.74 99.1%
3.0.4 + sync(false): 2.360u 1.240s 0:03.63 99.1%
3.2.1: 4.760u 0.410s 0:05.21 99.2%
3.2.1 + sync(false): 1.320u 0.370s 0:01.70 99.4%
Thanks, Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9111
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/9111: gcc 3.0.4 slow run time reults
@ 2002-12-31 4:06 dita
0 siblings, 0 replies; 2+ messages in thread
From: dita @ 2002-12-31 4:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 9111
>Category: c++
>Synopsis: gcc 3.0.4 slow run time reults
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 31 04:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Dr. Yechiel Kmichi
>Release: gcc version 2.95.3 20010315 (release) and Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs
>Organization:
>Environment:
gcc version 2.95.3 20010315 (release)
And
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs
Configured with: ../configure --enable-libgcj
Thread model: posix
gcc version 3.0.4
Kernel version: SunOS 5.8 Generic 108528-15 April 2002
>Description:
WE have here two simple C++ programs (to compare efficiency)
[For the record:
HelloWorld1.cc is doing
int
main()
{
for (int i = 0; i < 1000000; ++i) {
std::cout << "Hello World!" << std::endl;
}
return 0;
}
and HelloWorld2.cc is doing
int
main()
{
for (int i = 0; i < 1000000; ++i) {
std::cout << std::string("Hello World!") << std::endl;
}
return 0;
}
The problem is that any version of these runs 8 times FASTER
if compiled under g++ 2.95.3 (CSA-E450 Solaris 8)
than if compiled under g++ 3.0.4 (CSD-E3500 Solaris 8)
[note that only CSD can run both executables, with a minor speedup]
and timing was stored in corresponding files with -time-cs[ad]
more HW1-2.95.3-time-csa
8.0u 4.0s 0:12 94% 0+0k 0+0io 0pf+0w
more HW1-3.0.4-time-csd
57.0u 46.0s 1:45 97% 0+0k 0+0io 0pf+0w
more HW2-2.95.3-time-csd
11.0u 3.0s 0:15 88% 0+0k 0+0io 0pf+0w
more HW2-3.0.4-time-csd
62.0u 47.0s 1:50 98% 0+0k 0+0io 0pf+0w
>How-To-Repeat:
Compilethis source file once with gcc version 2.95 and once with version 3.0.4 and msure its runtime in both cases.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="HelloWorld2.cc"
Content-Disposition: inline; filename="HelloWorld2.cc"
#include <iostream>
#include <string>
int
main()
{
for (int i = 0; i < 1000000; ++i) {
std::cout << std::string("Hello World!") << std::endl;
}
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-31 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-31 4:52 c++/9111: gcc 3.0.4 slow run time reults paolo
-- strict thread matches above, loose matches on Subject: below --
2002-12-31 4:06 dita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).