precompiled headers and Sun Studio 10...
From: Trond Norbye (trond.norbye_at_gmail.com)
Date: 09/21/05
- Next message: Darren Dunham: "Re: tmpfs default perms"
- Previous message: Gary Mills: "Re: tmpfs default perms"
- Next in thread: Thomas Maier-Komor: "Re: precompiled headers and Sun Studio 10..."
- Reply: Thomas Maier-Komor: "Re: precompiled headers and Sun Studio 10..."
- Reply: Paul Floyd: "Re: precompiled headers and Sun Studio 10..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 21 Sep 2005 22:17:37 +0200
I am currently trying to improve compile-time performance by introducing
precompiled headers, but my tests so far have not given the expected
results. Instead of a reduced compile time, I am getting an increased
compile time.
In my test I created a file called pch.cpp with the following content:
#include "pch.h"
And I compiled the file with:
$(COMPILE.cc) -xpch=collect:pch -xpchstop=pch.h pch.cpp
In pch.h I added all of the header files that I used in the 6 files I
was going to compile. This might not be the best test, since it was only
one or two header files that was common for all of the files, but I
would expect a small decrease of compile time at least).
I used the following make rule to compile the files:
$(COMPILE.cc) -xpch=use:pch -xpchstop=pch.h filename
And when I timed the runs I got:
without precompiled headers: 30 seconds, with precompiled headers: 1m 30
sec.
When I look at the content of pch.Cpch it looks to me that this file is
just a preprocessed version of all of the headers. Is this correct?
Should I be doing this another way?
Trond
- Next message: Darren Dunham: "Re: tmpfs default perms"
- Previous message: Gary Mills: "Re: tmpfs default perms"
- Next in thread: Thomas Maier-Komor: "Re: precompiled headers and Sun Studio 10..."
- Reply: Thomas Maier-Komor: "Re: precompiled headers and Sun Studio 10..."
- Reply: Paul Floyd: "Re: precompiled headers and Sun Studio 10..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|