This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Precompiled headers (or other speed ups)


dewar@gnat.com wrote:
> 
> However, super fast compilation speed has never been a gcc goal. Early on
> this was problematic, but our experience, at least in the GNAT world, is
> that machines are getting fast enough that compilation time is not a
> bottleneck for most folks, even though gcc may have got slower in absolute
> terms.

Just to make sure there are no misapprehensions, compile time is the
*most* serious issue for GCC acceptance by Mac developers working on
OS X.  GCC is 10x - 20x slower than Metrowerks compiling the same code
on the same system, which means that frequently-recompiled programs
like the Finder take a couple minutes in MW, and nearly an hour with
GCC.  And just to make things worse, much of the interesting code is
C++ headers, so full recompiles are quite common.  Faster machines?
They would just make MW builds go faster too, so GCC still looks
just as lame.

The problem is basically headers - the Mac toolbox is about 100K lines
of definitions and declarations, and PowerPlant, which is a popular
C++ high-level toolkit, adds another 50K.  So we crunch 150K lines
of decls before getting to the 500 lines of actual source code,
over and over.  So yes, precompiled headers would win big, and indeed
that's where MW gets a big part of its advantage.  In the absence
of precompiled headers in GCC, I've been having to hack on Apple's
funky PCH-using preprocessor, just because it gets us 3x-4x speedup,
which is better than nothing.

Stan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]