lizmat / ParaSeq

Smarter parallel execution of Iterables
https://raku.land/zef:lizmat/ParaSeq
Artistic License 2.0
6 stars 0 forks source link

Should/could it parallelise reduce()? #1

Closed FCO closed 12 months ago

lizmat commented 12 months ago

Good point... I completely forgot about reduce! :-)

lizmat commented 12 months ago

Ok, so to get reduce working I guess we need to make sure that the order of the values in the source iterator does not matter.

Can we guarantee that for any given Callable?

Or do we say: DIHWIDT if the order did matter.

In any case, this would require a post-processing iterator step in this case, re-applying the produced values of each batch. Also need to make sure that each batch has at least 2 elements :-)

FCO commented 12 months ago

Isn't it enough to just make it clear on documentation?

lizmat commented 12 months ago

Added support for .reduce, .sum and .join in version 0.03, now in the ecosystem

lizmat commented 11 months ago

So done.