[C++-sig] Big slow compilation

Niall Douglas s_sourceforge at nedprod.com
Sat Nov 1 18:06:44 CET 2003


On 31 Oct 2003 at 17:06, Greg Abbas wrote:

> I've got a question. I just returned to a project that I had written
> about a year ago using boost::python version 1.28 (I think). After
> updating my Debian system I had trouble resolving all the old
> dependencies, so I decided to try 1.30, and gcc version 3.2. Now, my
> program (the boost::python part of it is 1500 lines long) won't even
> compile on the old 256MB machine, so I switched to a different Debian
> box that has 1GB of RAM and it compiles but takes about 10 minutes. If
> I turn off debugging (no "-g3") then I can get it down to about 3
> minutes, but that's still pretty different from all my other source
> files (some of which are a lot longer) that compile in a few
> _seconds_. Is this the result of boost, or gcc, or what? It's kind of
> a bummer because it makes my development cycle really slow. Is there
> anything I can do? (Besides go out and buy some overclocked
> watercooled hotrod CPU :-D).

That's the price of heavy template usage. Mine takes over an hour 
with a dual-processor 1700 machine with MSVC and more like six hours 
with GCC 3.2 uniprocessor.

To my knowledge, your only solution is the usual - GCC v3.4 (when the 
precompiled headers are fixed), faster machine, distcc and also 
consider applying that patch removing symbol folding which takes 
O(N^2) on GCC. Search the list archives. Lastly, also consider a 
faster compiler eg; Borland, Intel C++ etc.

Cheers,
Niall




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 208 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20031101/30d6477f/attachment.pgp>


More information about the Cplusplus-sig mailing list