This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Precompiled headers and templates
- From: Yang Zhang <yanghatespam at gmail dot com>
- To: GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Fri, 20 Mar 2009 05:20:25 -0400
- Subject: Precompiled headers and templates
Have people found precompiled headers to make significant difference
with template-heavy headers, esp. things like Boostified projects? I've
been trying to look up details on what the pre-compilation entails, but
I still don't have a good handle on this. I'm mainly wondering whether
it speeds up anything for templates that are instantiated outside of the
header (i.e. at the use site). I'm guessing not, since template
instantiation can induce arbitrary computation. If I'm right, then do
most folks try to include explicit instantiations in their precompiled
headers?
I plan to experiment with this, but am curious to know what others have
witnessed.
--
Yang Zhang
http://www.mit.edu/~y_z/