haskell-cafe@haskell.org
[Top] [All Lists]

[Haskell-cafe] Don't âaccidentallyparallelizeâ

Subject: [Haskell-cafe] Don't âaccidentallyparallelizeâ
From: Gracjan Polak
Date: Sat, 5 Sep 2009 11:18:24 +0000 UTC
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


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>