This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Suggestions for improving gcc 3.2 compilation speed?
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Mike Stump <mrs at apple dot com>
- Cc: Biagio Lucini <lucini at thphys dot ox dot ac dot uk>, Lars Segerlund <lars dot segerlund at comsys dot se>, gcc at gcc dot gnu dot org
- Date: Fri, 07 Mar 2003 11:28:17 -0800
- Subject: Re: Suggestions for improving gcc 3.2 compilation speed?
- References: <936612EE-50CF-11D7-A309-003065A77310@apple.com>
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