Precompiled headers (or other speed ups)

Andi Kleen ak@suse.de
Wed Jan 10 05:29:00 GMT 2001


dewar@gnat.com writes:

> 
> Of course the speeds that Stan is reporting are horribly slow in absolute
> terms. The real question is *why* slo slow. 150K lines of decls
> to be crunched should not be taking anywhere NEAR that long, since it
> is not necessary to generate full code for these decls, or at least 
> should not be.

In my experience g++ is much slower than the gcc C compiler, even without
excessive include files -- the include heavy style common for C++ makes
things just worse. The difference is visible when you just watch Makefile
runs. 

I don't know why that's the case, but I suspect all the operator overloading
resolving and handling of the non regular C++ grammar etc. has a cost over C.
[It actually quite surprised me, I always assumed that the backend would
dominate compile cost]

I guess it would be useful if Stan could post a few a profile logs of 
g++ compiling PowerPlant code, just to see where the hot spots are.

-Andi 


More information about the Gcc mailing list