This is the mail archive of the
mailing list for the GCC project.
Re: gcc compile-time performance
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Robert Dewar <dewar at gnat dot com>, "jss at ast dot cam dot ac dot uk" <jss at ast dot cam dot ac dot uk>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sat, 18 May 2002 14:29:29 -0700
- Subject: Re: gcc compile-time performance
- References: <20020518211930.64063F28D4@nile.gnat.com>
--On Saturday, May 18, 2002 05:19:30 PM -0400 Robert Dewar <email@example.com>
>> Remember that the whole technique involved here is to force the compiler
>> to do a variety of domain-specific optimizations that it would not
>> otherwise do. The reason your front end/back end distinction doesn't
>> work here is that the front end is doing as much optimization as the
>> back end.
> I understand this approach, but it seems far from mainstream C++ usage
> to me. Are you sure that complaints about C++ compilation speed are really
> specifically with respect to this kind of paradigm?
Yes, I'm sure that this is one of the major sources of complaints. A
lot more people are doing things along these lines that you might expect;
the C++ standard library now contains primitive versions of these ideas.
(Even doing basic standard I/O requires instantiating tons of templates
and processing thousands of function bodies -- although it does not
use template meta-programs heavily.)
People who are just using "basic" C++, i.e., ARM-era C++ aren't
complaining a *whole* lot -- except in the case that they are reading
in gazillions of header files. Especially *without* optimization,
if your project contains tons of files with little code per file,
and each file is including literally thousands of header files, all
your time is spent stat'ing files. That's part of why precompiled
headers are a big win for those folks; even with a much faster front
end you'd still have to open all the files.
For the people using "advanced" C++, i.e., template meta-programming,
the file system access issues are less important -- until we, as you
suggest, speed up the front end. Then they will reappear.
Mark Mitchell firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com