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]
Other format: [Raw text]

Re: Suggestions for improving gcc 3.2 compilation speed?


On Friday, March 7, 2003, at 03:09 AM, Biagio Lucini wrote:
Could you give me an example of a fast compiler? My only term of
comparison is the Intel one, and with it it takes ages to compile the most
trivial program.

I have a g++ compiler that is 5.6x faster than the current g++ when compiling large C++ code bases. That's when compared to a g++ PCH, without it, more like 8x to 16x faster when PCH isn't used. Work in progress, but it shows that g++ can be fast, if we want it to be. For trivial files, small projects and single files, the speedup is 0.


The patches help understand the upper limit on speedups possible if we just work smarter with header files.

To use, generate a file sorta like:

#include "AboutWindow/AboutWindow.cp"
#pragma translationunit "StatusBar/StatusBar.cp"
#include "StatusBar/StatusBar.cp"
#pragma translationunit "Preview/ColumnPreview.cp"
#include "Preview/ColumnPreview.cp"
[ ... ]

and then time a -S build of it and compare against a -S build of all the individual files.

Attachment: multiunit.diffs
Description: Binary data


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