This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46186] Clang creates code running 1600 times faster than gcc's
- From: "jak at jak-linux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Oct 2010 15:00:52 +0000
- Subject: [Bug c/46186] Clang creates code running 1600 times faster than gcc's
- Auto-submitted: auto-generated
- References: <bug-46186-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186
--- Comment #7 from Julian Andres Klode <jak@jak-linux.org> 2010-10-26 15:00:37 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > GCC's output is significantly faster at -O3 or without the noinline attribute
>
> I just tested and at -O3, gcc-4.4 creates slow code and gcc-4.5 fast code. At
> -O2, both are equally fast. The clang 1.1 code at -O2 is as fast as GCC 4.5's
> code at -O3.
Using gcc 4.5 with -O3 may work for the C code, but it does not optimize the
C++ code posted at http://lwn.net/Articles/411776/:
g++-4.5 -O3: real 0m1.608s
clang++ -O2: real 0m0.003s
clang++ -Os: real 0m0.003s
But I guess the C++ problem might be a different one.