[Haskell-cafe] Don't “accidentallyparallelize”

Gracjan Polak gracjanpolak at gmail.com
Sat Sep 5 07:18:24 EDT 2009


Hi all,

In "DEFUN 2009: Multicore Programming in Haskell Now!"
(http://donsbot.wordpress.com/2009/09/05/defun-2009-multicore-programming-in-haskell-now/),
slide 30 I see:

Don't “accidentally parallelize”:
– f `par` f + e

and that the correct way of achieving parallelism is:
– f `par` e `pseq` f + e

Actually I don't understand the difference between these two forms. Could any
brave soul explain it to me, please?

As a bonus question: what is the difference between `seq` and `pseq`?

-- 
Gracjan




More information about the Haskell-Cafe mailing list