Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-02-07 13:24:31


> But I wanted to ask if you have some example demonstrating this, or
> is it explained in docs. Because frankly speaking I don't understand
> what you mean here. I type 'make clean' and then I type 'make'.
> Nothing is precompiled at this stage, so how I can save time?
>
> My app is huge, and it already takes long to compile, so I prefer to
> use this "one-time cost" solution.

Hi Janek,

I may have been a bit imprecise previously - there are two issues here :

1) reprocessing of all the header files with every compilation. this
overhead
can be mitigated by preprocessing those headers that are stable
(don't change
frequently) such as Boost library headers. the details depend on
which compiler
you are using; here's a link to the gcc docs:

http://gcc.gnu.org/onlinedocs/gcc-4.0.1/gcc/Precompiled-Headers.html

2) doing the compile-time MPL stuff. here, if your program is really
only dealing
with a restricted set of units, you can use explicit template
instantiation :

http://www.network-theory.co.uk/docs/gccintro/gccintro_60.html

of course, this only works if you are only working with pre-defined
units (like
from the SI system); if there are numerous unit computations within
your main
code, this doesn't solve the problem...

Matthias

----------------------------------------------------------------
Matthias Schabel, Ph.D.
Assistant Professor, Department of Radiology
Utah Center for Advanced Imaging Research
729 Arapeen Drive
Salt Lake City, UT 84108
801-587-9413 (work)
801-585-3592 (fax)
801-706-5760 (cell)
801-484-0811 (home)
matthias dot schabel at hsc dot utah dot edu
----------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk