This is the mail archive of the
mailing list for the GCC project.
Re: gcc compile-time performance
- From: Jeremy Sanders <jss at ast dot cam dot ac dot uk>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 18 May 2002 14:24:05 +0100 (BST)
- Subject: Re: gcc compile-time performance
On Sat, 18 May 2002, Robert Dewar wrote:
> > The slowness of gcc when compiling is why I haven't been writing anything
> > using the gtkmm and gnomemm libraries (C++ gtk wrapper,
> > http://gtkmm.sourceforge.net/ ). It can take minutes to compile an
> > example program on my (old) 400MHz PII. The library has a lot of template
> > usage, so I suspect this is what causes the problems.
> It is certainly apparent that a lot of the problems with speed come from
> people using old slow machines. After all for $1000 you can get a machine
> that will be 4 times faster than this 400Mhz PII, and no amount of technical
> work will speed up GCC by this factor.
Sure. At work I have a rather fast athlon, which makes compilation a lot
more pleasurable, but I don't work on my own projects in work time!
However, gcc C++ compilation still feels very slow on a fast machine
(especially if you use something like libtool :-). I feel that precompiled
headers would greatly improve the compilation speed of a template-heavy
C++ code. I don't have any data on that - if someone would like to point
me towards a patch for gcc-3.x, I'd like to compare the difference. Maybe
it would be greater than the 4x differential :-) ?
> But I quite understand that for many volunteer developers who are not paid
> for their time, the normal equation that immediately says that such an
> expenditure is worth while may not apply (certainly no serious commercial
> users are going to mess with such machines).
Exactly. Employees' time is more valuable than computers. However there
are still some places who have less freedom (i.e. money) to buy new
o Educational institutions (how much do students cost ? :-)
o Private individuals working on free software projects
o Private individuals trying to learn new programming skills
o People in less-developed countries
o People working on historically interesting platforms
o People who can only code for "tried and tested" (ie old) hardware for
safety reasons (however, they can probably compile their code on new
It would be a shame if gcc would only run on the "latest and greatest"
> In practice, machines do get faster faster than programs get bigger, so I
> suspect that the complaints about speed disappear over time. I know that
> in the COBOL world, Realia COBOL was ten times faster than its competitor
> (Microfocus), and when you compared 10,000 lpm on a PC1 with 1,000 lpm or
> less, that really made a difference, but by the time you were comparing
> 1,000,000 lpm with 100,000 lpm it was not such a critical difference.
I expect this won't be an issue in 10 years, however look at the
<cough> itanium... Not very easy to compile for.
I'd just be nice for gcc to be faster if that wasn't too hard to do! Maybe
precompiled headers would make a significant difference. Perhaps gcc
developers would like to get gcc's internals in a better state before
going down this line.
Jeremy Sanders <firstname.lastname@example.org> http://www-xray.ast.cam.ac.uk/~jss/
X-Ray Group, Institute of Astronomy, University of Cambridge, UK.