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: Tremendous performance regression in 1.1.2 -> mainline


David Edelsohn wrote:
> 
>         There clearly is a significant problem with the performance of the
> compiler itself.  Others have told me privately that GCC takes 25x longer
> to compile a large, commercial operating system than its commercial
> compiler counterpart.

OK, since David is being a tease :-) , I'll fill in the blanks.

As I've mentioned before, Apple is using 2.95.2 + patches to build
Mac OS X.  One of the important components is the Finder, which
is a medium-size blob of C++ code.  One piece of it, the "Finder_FE"
is about 100K lines of C++.  When we build this with our version of
GCC, it takes about 75 minutes or so, slightly less if optimization
is turned off.  But using Metrowerks' CodeWarrior and a precompiled
header, it takes about 3 minutes to build the whole thing.  There
are lots of variables here, and one could argue about the importance
of full vs incremental rebuilds, but the basic situation remains;
for many Mac developers, GCC will be an order of magnitude slower
than what they've been using for the past several years.  Not a
factor of 2, or 4, but a factor of 10 or more.

This is a big problem.  Not only is there the time-wasting aspect,
but for the community of Mac developers, this will be the first time
that they'll be encountering GCC and able to compare to CW on the
same platform.  The order-of-magnitude slowdown is not going to make
a good first impression!

So my highest-priority task for Apple is to analyze the root causes
of this situation and recommend a solution.  We have precompiled
headers for ObjC that speed up compilation by a factor of 4 - but
only for C and ObjC code.  I'm picking apart the Finder compilation
to find its hot spots (the headers being sucked in are enormous,
so precomps seem like a good idea).  I'm talking with everybody who
has ideas, and we do have money to spend, if it will solve the problem.
If it's not possible to get a factor-of-10 speedup, then I'll have
to explain why MW can do it and GCC can't - fortunately Apple's
developer conference is in May and I'm going to be out of the
country then, so some other victim will get to make the excuses to
unimpressed Mac developers. :-)

Stan

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