This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC-3.4.0/PCH - some numbers incl. a bug report
- From: Karel Gardas <kgardas at objectsecurity dot com>
- To: Rene Rebe <rene at rocklinux-consulting dot de>
- Cc: gcc at gcc dot gnu dot org, <valentin at rocklinux-consulting dot de>
- Date: Thu, 29 Apr 2004 15:12:06 +0200 (CEST)
- Subject: Re: GCC-3.4.0/PCH - some numbers incl. a bug report
On Thu, 29 Apr 2004, Rene Rebe wrote:
> Hi,
>
> I just reviewed the advantage PCH would offer for one of our C++
> projects. So here are the build times (GNU/Linux, PowerPC, GCC-3.4.0):
>
> A normal build without PCH:
>
> real 2m26.986s
> user 2m5.440s
> sys 0m12.120s
>
> a build including PCH generation:
>
> real 4m6.156s
> user 3m32.030s
> sys 0m23.940s
>
> a build using the existing PCH from the previous build:
>
> real 2m4.426s
> user 1m44.230s
> sys 0m10.840s
>
> So we get a 15% speedup for subsequent build - with a 67% slowdown for
> the first build. Are this expected numbers?
>
I guess your source tree is not optimized for PCH enabled build. General
hint which I have found during MICO hacking to be optimized for PCH build
is: less PCH files you produce during the build, better. So you normaly
end with one header file accumulating all needed header files and this is
used for PCH enabled build. Then you are able to get much better numbers
than you provided above.
Cheers,
Karel
--
Karel Gardas kgardas@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com