public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: dita@cs.technion.ac.il To: gcc-gnats@gcc.gnu.org Subject: c++/9111: gcc 3.0.4 slow run time reults Date: Tue, 31 Dec 2002 04:06:00 -0000 [thread overview] Message-ID: <20021231115711.17011.qmail@sources.redhat.com> (raw) >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; }
next reply other threads:[~2002-12-31 12:06 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-31 4:06 dita [this message] 2002-12-31 4:52 paolo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021231115711.17011.qmail@sources.redhat.com \ --to=dita@cs.technion.ac.il \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).