Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: e DOT d DOT k DOT i DOT s DOT e DOT r AT j DOT a DOT x DOT n DOT e DOT t DOT c DOT o DOT m (M. Edward Kiser), djgpp AT delorie DOT com Date: Tue, 24 Jun 1997 17:55:16 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Precompiled headers. Precedence: bulk > e DOT d DOT k DOT i DOT s DOT e DOT r AT j DOT a DOT x DOT n DOT e DOT t DOT c DOT o DOT m (M. Edward Kiser) wrote: > "John M. Aldrich" wrote: > >Gregary J Boyles wrote: > >> > >> Does DJGPP have them? > > >What are they? And why would you want them? Headers get inserted into > >your code by the preprocessor and compiled along with the rest of your > >program. I'm afraid that I don't understand what you're asking. > > To answer the second question, pre-"compiled" headers are actually > pre-PARSED headers. To generate a pre-"compiled" header file, the > compiler dumps its symbol table after parsing the header files; to use > it, the compiler merely reads this symbol table back in instead of > parsing the header files again. Obviously, this is only useful if you > have a lot of CPP files that #include the SAME headers in the SAME > order. But many programs do this, especially with large complicated > header files like windows.h, the Standard Template Library, or any > large windowing framework such as SWORD or OWL. Pre-compiled headers > can speed things up a LOT. I agree that's a good feature, but I don't know if gcc will be benefited from that, just take some code that uses includes heavilly (TVision code for example), run it in a Loose 95 box but windowed (not full screen), pay attention to the name of the window, it will change from cpp to cc1plus according to the program that's executing the command.com. You'll see that cpp is fast in comparisson with cc1plus. Now you can say: But it will speedup the cpp part and a 10% is usefull. For that you must take in count that precompiled headers must be loaded to memory and saved to disk so the impact won't be so huge. I guess it works very well for Borland compilers because the preprosses part is equally fast than cpp but the real compiler is much more faster so the percent is greater. Anyways, it can speed up gcc, at least a little. Ah! I almost forget that: Don't forget the size!, for C medium projects a 2Mb file is common in BC, for huge C++ projects .... I don't think that's a good idea the way Borland implements that, I guess is better one file per .o and not one per project. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013