This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Apple's implementation of precompiled headers
- To: dewar at gnat dot com, shebs at apple dot com
- Subject: Re: Apple's implementation of precompiled headers
- From: dewar at gnat dot com
- Date: Sat, 29 Sep 2001 09:39:37 -0400 (EDT)
- Cc: degger at fhm dot edu, gcc at gcc dot gnu dot org
<<At a million lines/minute, GCC would still be slower than Metrowerks.
We do have to be just as fast with C++.
>>
Well indeed a million lines a minute is very conservative (my efficient
Ada parser goes at about 50 million lines a minute on a modern PC). But
on the other hand, in practice a million lines a minute is probably
adequate. For C++ the semantic analysis is indeed more of a problem.
<<VM is your friend. mmap keeps you from having to process every byte,
and the most-popular declarations will tend to stay in memory from one
compilation to the next.
>>
As will the most popular headers in source form :-)
<<If that doesn't suffice, then the next thing would be to keep the
compiler process live and feed it a stream of filenames to work on,
but I don't know that we need to go that far yet.
>>
Yes, to me that is a better way to go, and we have considered this for
the GNAT compiler, this way you remove all the extra processing, including
that for reading and writing the tree files. It also better preserves
the simplicity of a system where everything is compiled from source.