GCC 3.3 compile speed regression - AN ANSWER

Rob Taylor robt@flyingpig.com
Tue Feb 11 11:56:00 GMT 2003


On Tuesday, 11 February 2003, at 00:52 PM, Mike Stump wrote:
> To: Joel Sherrill
> Cc: Steven Bosscher; Phil Edwards; Michael S. Zick; gcc@gcc.gnu.org
> Subject: Re: GCC 3.3 compile speed regression - AN ANSWER
>
>
> On Monday, February 10, 2003, at 03:27 PM, Joel Sherrill wrote:
> > Has anyone looked at how much the binutils contribute to the end to
> > end performance question?  gas is involved in every compile and ld is
> > involved in every program link.  I just don't recall it every being
> > mentioned.
>
> Yes.  Down so far in the noise, that I don't even want to mention how
> long they take, but I can, gas 2.6%, ld 1.3%.  Testcase Finder_FE with
> -Os -g.  Note, these are for Apple's versions of these tools in our
> environment, and on Linux, you may see different numbers.

For the reference, I work on a large(ish) c++ project

(core of project as reoprted by sloccount  -
205418  components      cpp=194659,ansic=8935,yacc=1824
66198   applications    cpp=55095,ansic=9542,lex=707,sh=317,
                        perl=286,yacc=179,asm=72
)

a compile of these sections takes approx 1.5 hours on a 800Mhz ppc using
g++-3.1 under debian (i haven't even dared go near 3.2). Swap is never hit.
It takes 20 minutes on an equivalent pc under msvc. Linking time is minimal
on linux compared to linking time on msvc.

g++ is so incredibly slow - observe:

hellow.cpp:
#include <iostream>

int main()
{
    std::cout << "Hello, world!\n";
}

robt@hal:~$ time g++-3.1 hellow.cpp

real    0m1.815s
user    0m1.620s
sys     0m0.090s

Most of our simple (real) cpp's take at least 3 cpu seconds per compile,
rising to around 20-25 cpu seconds for qt-based ui code.


Yours
Rob Taylor



More information about the Gcc mailing list