This is the mail archive of the 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]
Other format: [Raw text]

Re: gcc compile-time performance

--On Saturday, May 18, 2002 05:19:30 PM -0400 Robert Dewar <> 

>> 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         
CodeSourcery, LLC     

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