Boost logo

Boost :

Subject: Re: [boost] Stacking iterators vs. dataflow
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-09-03 09:56:03

Phil Endecott wrote:

> Is it true to say that stacked iterators implement a "data pull" style,
> while dataflow implements "data push"?
> I also note that Arno wants to use stacked iterators because this
> alternative:
> result = fn1( fn2( fn3( fn4( huge_document ) ) ) );
> creates large intermediates and requires dynamic allocation.

Personally I like to think of iterator adaptors as a form of lazy
evaluation, while algorithms are eager evaluation.

> Again, a
> framework that allowed buffering of "sensible size" chunks and
> potentially distributed the work between threads could be a good solution.

If you perform n transformations, adaptors will give you loop fusion for
That kind of optimization seems more interesting to me than work
distribution and buffering.

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