Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-23 16:54:14

Phil Richards <news_at_[hidden]> writes:

> On Thu, 22 Jan 2004 18:24:11 -0500, David Abrahams wrote:
> [with regards to my g++/fold-zip_view performance woes]
>> The first thing to do is try an implementation of fold which doesn't use
>> iter_fold_if under-the-covers. It will still be general, but there will
>> be less code-reuse (under the covers).
> iter_fold_if isn't used in the implementation of fold. Did you mean
> something else?

Nope; Aleksey had told me that it was, so I was going on his word.

> Having played around a bit more, my finger is starting to point in the
> general direction of zip_view - fold on an mpl::vector is quick to
> instantiate. zip_view iterator support (begin and end) appear to be slow
> to instantiate - and this causes the slow down in the fold statement that
> I'm using.
> I'll have a look at zip_view, but on first looks it doesn't exactly look
> simple :-)

Replacing lambda expressions with metafunction classes would be my
first strategy.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at