Re: [Haskell-cafe] Why should we write "a `par` b `pseq` (f a b)" instead of "a `par` b `par` (f a b)"?

2013-01-20 Thread Johannes Waldmann
Petr P gmail.com> writes: > Is there any reason to use >   a `par` b `pseq` (a + b) > instead of >   a `par` b `par` (a + b) (better ask this on parallel-haskell?) > It seems to me that the second variant would work as well: > The main thread would block on one of the sparked computations, I

[Haskell-cafe] Why should we write "a `par` b `pseq` (f a b)" instead of "a `par` b `par` (f a b)"?

2013-01-19 Thread Petr P
Dear Haskellers, I've been playing with par and pseq, and I wonder: Is there any reason to use a `par` b `pseq` (a + b) instead of a `par` b `par` (a + b) except that the second version sparks twice instead of just once (which probably degrades performance a bit)? It seems to me that the sec