[Haskell-cafe] derivation of mapP, a parallel, lazy map
felipe.lessa at gmail.com
Mon Feb 25 23:00:53 EST 2008
On Tue, Feb 26, 2008 at 12:49 AM, Dan Zwell <dzwell at gmail.com> wrote:
> Clearly using parBuffer would be a win on machines with lots of CPUs,
> but is there any reason that I would want to use it instead of the mapP
> I've already defined?
You certainly don't want the end user to modify a lot of handwritten
functions just to use your program on his brand new processor.
Actually, you don't want even to force him to recompile your program!
(think of distributed binaries)
Besides, most programs go beyond simple list processing. Maybe using a
fixed constant (not related to the number of processors) may be a
sensible default for part of a program that you don't know how many
lists are being processed in parallel because they are part of a
bigger computation outside its scope. But I don't have much experience
here, so I'll let the par-gurus from the mailing list to explain
More information about the Haskell-Cafe