This is the mail archive of the
mailing list for the GCC project.
Re: Precompiled headers (or other speed ups)
- To: dewar at gnat dot com
- Subject: Re: Precompiled headers (or other speed ups)
- From: Stan Shebs <shebs at apple dot com>
- Date: Tue, 09 Jan 2001 14:30:33 -0800
- CC: amep at softhome dot net, gcc at gcc dot gnu dot org
- References: <20010109044108.CE76A34D80@nile.gnat.com>
> 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
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.