Hi all,

I just noticed on a different header-only library that MSVC is up to
something strange -- and slow -- inside the <functional> header.

If TR1 support is enabled (and it seems to be by default), it includes
a series of headers repeatedly. I didn't look very closely, but it
seems to be some kind of elaborate preprocessor code-generation.

Unless cpp-netlib depends on TR1 you could try disabling TR1 support
before including any standard library headers;

  #define _HAS_TR1 0

Or in the jam files building the tests.

It cut my compile times from 20 sec to 12-13 sec, so it made a
significant difference.

Cheers,
- Kim

On Wed, Feb 10, 2010 at 07:01, Dean Michael Berris
<[email protected]> wrote:
> On Compile-time optimization, there are three main drivers for compile
> time complexity with GCC and MSVC especially (I've heard reports that
> clang is just wicked fast with template metaprogramming, but I've yet
> to see it first hand):
>
>  * Boost.Spirit (even if you use the specific headers)
>  * Boost.Fusion (even if you use the specific headers)
>  * Boost.MPL (for tests is being used, and even if you use the
> specific headers)
>
> We *can* do some things to make compile times a little more bearable
> using a lot of different techniques but basically I personally have
> given up already and am just waiting for the tools to evolve. ;) And
> no, for the record I'm not considering going the other route of .cpp
> files. :D
>
> Maybe when the features list is shorter, we can think about optimizing
> compile times of just cpp-netlib. Unfortunately we're too dependent on
> Boost libraries that exercise your compilers' limits at the moment.
>
> --
> Dean Michael Berris
> cplusplus-soup.com | twitter.com/deanberris
> linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Cpp-netlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
>

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Cpp-netlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel

Reply via email to