discuss-gnustep
[Top][All Lists]
Advanced

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

Header file inclusion speed


From: Markus Hitter
Subject: Header file inclusion speed
Date: Wed, 1 Jan 2003 01:20:34 +0100


Hi all,

using my current darling, the GDL2 project on Mac OS X, I tried to find out which flavour of header file inclusion gives the best performance.

In most of the files, I set headers up like:

#ifdef HAS_PRECOMPILED_HEADERS
#import <Foundation/Foundation.h>
#else
#import <Foundation/NSObject.h>
...
@class NSDictionary;
...
#endif
#import <EOControl/EOWhatever.h>
...


Compile times for EOControl only on my iBook 500 MHz are:

HAS_PRECOMPILED_HEADERS defined, PFE(*) off: 45 Seconds
HAS_PRECOMPILED_HEADERS undefined, PFE off: 45 Seconds
HAS_PRECOMPILED_HEADERS defined, PFE on: 45 Seconds
HAS_PRECOMPILED_HEADERS undefined, PFE on: 45 Seconds
HAS_PRECOMPILED_HEADERS defined, CFLAGS=-no-cpp-precomp: 5 Minutes 35 Seconds HAS_PRECOMPILED_HEADERS undefined, CFLAGS=-no-cpp-precomp: 5 Minutes 46 Seconds

*sigh*

It doesn't seem to matter at all which flavour of #import/#include and which type of precompilation one uses. The only difference seems to be wether you use precomps at all.

Sombody with other numbers?


Cheers,
Markus

(*) PFE is some newer technology for header precompilation. Switched it on/off with a checkbox in ProjectBuilder

P.S.: Please note, the absolute numbers are not too well since the PBX build environment does a lot of things intermediate: file copying, class indexing, GUI handling, CVS, ...
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/





reply via email to

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