This is the mail archive of the gcc@gcc.gnu.org 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]

Re: Apple's implementation of precompiled headers


dewar@gnat.com writes:

> <<You shouldn't be that amazed, I reported the experimental results
> last year.  If you want fast compilation of programs with huge
> headers (for Macs the round number is 100K lines of header pulled
> in per source file), you have to have the set of declarations in
> memory and available for random access by name.  Parsing, compiling,
> reading from disk, all of them take too long.
> >>
> 
> But they really shouldn't take that long, disks are slow beasts. 

Headers are read many times in a typical compile, and only the first
time are they read from actual disk; the remainder is from cache.
Indeed, in a typical edit-compile-run-debug-edit-compile cycle, on
small-to-medium projects it's quite likely that the sources are still
in memory when the second compile starts.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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