This is the mail archive of the
mailing list for the GCC project.
Re: Faster compilation speed
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, drow at mvista dot com
- Cc: Theodore dot Papadopoulo at sophia dot inria dot fr, gcc at gcc dot gnu dot org,mrs at apple dot com, phil at jaj dot com, shebs at apple dot com
- Date: Tue, 13 Aug 2002 12:10:40 -0400 (EDT)
- Subject: Re: Faster compilation speed
<<Yes it is - projects have grown correspondingly. Maybe not for COBOL,
but for the sorts of things GCC is used for. A factor of ten is
still very significant, which is the whole point of Apple's efforts!
Actually COBOL programs are FAR FAR larger than C or C++ programs in practice.
In particular, single files of hundreds of thousands of lines are common, and
complete systems of millions of lines are common. That's why there is so much
legacy COBOL around :-)
My point is that a factor of ten is relative.
If you have a million lines COBOL program and it takes 10 hours to compile,
then cutting it down to 1 hour is a real win. If it takes 10 minutes to
compile, then cutting it down to 1 minute is a much smaller win in practice.
Remember, I am a great fan of fast compilers. Realia COBOL is certainly the
fastest compiler for arbitrarily large programs ever written for the PC, and
when I used to bootstrap the compiler (it was about 100,000 lines of COBOL)
on a 386 in a couple of minutes, that was definitely pleasant. I certainly
agree that GCC is slow :-)
My point is that if you embark on a big project that will take you two
years to complete successfully, that speeds up the compiler by a factor
of two, then it probably will seem not that worth while when it is finished.
You have to look for easy opportunities for big gains. Nothing else is worth
while. In general you cannot design a slow compiler and then molest it into
being a fast compiler, you have to design in speed as a major criterion from
the start. Small incremental changes just don't get you where you want to be.
Obviously in our situation PCH are a good target of opportunity (though I
will say again, that if you designed a really fast C++ compiler, that
compiled code at millions lines/minute, then PCH would not be such an
obvious win, but that's not what we are dealing with here).