|
Boost : |
Subject: Re: [boost] [fusion] improving compile times
From: Eric Niebler (eric_at_[hidden])
Date: 2009-06-03 16:36:33
David Abrahams wrote:
> on Tue Jun 02 2009, Eric Niebler <eric-AT-boostpro.com> wrote:
>> I read form the Wikipedia entry that Clang's C++ support is 2-3 years
>> from being usable, though.
>
> I wouldn't bet against Doug Gregor when he's firing on all cylinders :-)
I didn't know Doug was involved. That changes everything! :-)
>> From the user time, my recent changes make this test compile twice as fast for gcc-3.4
>> (cygwin). For MSVC, the wins are less dramatic.
>>
>> Your point is taken, though ... instantiation count is merely a rule
>> of thumb and the real measure is clock time. It is, in my experience
>> and with compilers actually in use today, a very good rule of thumb,
>> though.
>
> Well, it's great to get the instantiation count down, but consider that
> what you're replacing it with may not be any faster :-)
See the comment above about a measured 2x speed-up.
> If you *are* getting a win from PP metaprogramming, there's a good
> chance that you could improve the speed a lot more, e.g. by using the
> "z" parameter as described in
> http://www.boostpro.com/tmpbook/preprocessor.html#horizontal-repetition
Yep, I know about that, but generally avoid nested horizontal
repetition. Nevertheless, I appreciate the suggestions.
For anybody concerned about the nature of my changes, here is an example
of the fat in Fusion I'm trimming:
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk