[phobos] std.parallelism: Request for review/comment
Lars Tandle Kyllingstad
lars at kyllingen.net
Tue Aug 31 03:22:09 PDT 2010
Point (3) is pretty cool. I just used your module for my current
project at work, and the ability to get the index made the code a lot
nicer.
Another question: Why have you chosen the default number of work units
to be just two units per thread? In my experience, it's not uncommon
that calculations are harder on some parts of the range than others, and
then there is a risk of some cores running out of work to do. I'd think
that having more work units, 3-4 per thread, say, would allow for better
distribution of work between cores.
-Lars
On Sun, 2010-08-29 at 17:32 -0400, David Simcha wrote:
> This is basically the latest incarnation of ParallelFuture, but with
> improved documentation. A lot has changed, though, since the first
> incarnation. Here are some of the more important changes:
>
> 1. Parallel map and reduce.
> 2. Merge Task and Future.
> 3. foreach(i, elem; pool.parallel(range)) now works.
> 4. ref foreach now works even for non-random access ranges. (It's
> implemented by incrementally copying pointers into an array.)
> 5. Worker-local storage.
>
> On 8/29/2010 4:42 PM, Lars Tandle Kyllingstad wrote:
> > I have tried it before, and based on that (unless you have made
> > substantial changes since it's first incarnation as 'parallelfuture') I
> > say it's good to go.
> >
> > I only have two suggestions:
> >
> > 1. Can we call it std.parallel instead?
> >
> > 2. IMO, the killer feature of the module is the parallel foreach.
> > Therefore, I think parallel() should be moved to the top of the module,
> > so it's the first thing one sees upon reading the documentation.
> >
> > -Lars
> >
> >
> > On Sun, 2010-08-29 at 13:56 -0400, David Simcha wrote:
> >> Since there seems to be interest in my parallelfuture library becoming
> >> std.parallelism even if it uses unchecked implicit sharing, I've cleaned
> >> up the code, removed anything that could possibly be construed as having
> >> been borrowed from Tango (which previously was just a few tiny,
> >> unoriginal ASM snippets) and improved the documentation. I'm requesting
> >> review of it. The code is available at:
> >>
> >> http://dsource.org/projects/scrapple/browser/trunk/parallelFuture/std_parallelism.d
> >>
> >> A draft of how the documentation would look is available at:
> >>
> >> http://cis.jhu.edu/~dsimcha/d/phobos/std_parallelism.html
> >>
> >> BTW, how are we working the review process for new modules? Do they get
> >> reviewed here first, then in the NG, should they be posted directly to
> >> the NG, or what?
> >>
> >> --Dave
> >> _______________________________________________
> >> phobos mailing list
> >> phobos at puremagic.com
> >> http://lists.puremagic.com/mailman/listinfo/phobos
> >
> > _______________________________________________
> > phobos mailing list
> > phobos at puremagic.com
> > http://lists.puremagic.com/mailman/listinfo/phobos
> >
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list