This is the mail archive of the
mailing list for the GCC project.
Re: Apple's implementation of precompiled headers
- To: dewar at gnat dot com
- Subject: Re: Apple's implementation of precompiled headers
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 01 Oct 2001 15:04:19 -0700
- CC: gcc at gcc dot gnu dot org
- References: <20010929125647.B2BA8F2BB1@nile.gnat.com>
> <<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 <firstname.lastname@example.org>