3 ms·
No, that was never "the promise" of Haskell. Making automatic implicit parallelism in Haskell is trivial - but it will yield too much parallelism and the overh
by Peaker 16y ago
No, that was never "the promise" of Haskell.
Making automatic implicit parallelism in Haskell is trivial - but it will yield too much parallelism and the overhead will trump the benefits.
The `par` and `pseq` combinators allow the programmer to specify which computations to parallelize explicitly to avoid parallelizing computations that are too small to be worth it and to allow the programmer to care for data-locality.
Despite being explicit, they are still far easier than other explicit parallelism mechanisms such as explicit threads because they are:
* So easy to throw in the program
* Guaranteed not to alter the semantics of your program - so you can just throw them in there and profile the performance changes -- and you know they won't break your program. They can alter the performance for better or worse.