autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: precompiled headers can cause big slowdowns


From: Fergus Henderson
Subject: Re: precompiled headers can cause big slowdowns
Date: Thu, 19 Apr 2001 17:19:35 +1000

In mail to address@hidden,
On 18-Apr-2001, Stan Shebs <address@hidden> wrote:
> Exactly, and that's why our cpp-precomp support includes -cpp-precomp
> and -no-cpp-precomp flags to explicitly control the choice.  cpp-precomp
> works by parsing all of its input and tracking xrefs, so it will always
> be slower than a plain preprocessor.  The win comes if the xrefs lead
> into a precompiled header, which is an indexed mappable thing and
> very efficient to access randomly.  Unfortunately for people porting,
> the only standard precompiled headers are for Cocoa or Carbon, plus
> there is a "libc.h" that you could add to get all of your standard
> system headers in precompiled form; but a "pristine" Unix program won't
> include libc.h and won't use any Mac headers, so it doesn't benefit
> from the use of cpp-precomp, and may in fact compile more slowly.

In that case, it might even be a good idea to patch autoconf so that
on Darwin it includes `-no-cpp-precomp' in $CC by default.

-- 
Fergus Henderson <address@hidden>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]