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?


Mike Stump <mrs at apple dot com> writes:

> 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.

That's clever.  Do you think you could make this happen automatically
when more than one input file is given on cc1(plus)'s command line?  I
believe the Java front end does something like that already.

zw


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