I’am reading the book Parallel and Concurrent Programming in Haskell. The book has an explanation of the Eval monad. It compares rpar/rpar (example 2-1), rpar/rseq (example 2-2), rpar/rseq/rpar (example 2-3) and rpar/rpar/rseq/rseq in rpar.hs The examples run all in the total time 0.82 s.

When I run rpar/rpar (example2-1) on my computer total time is 1.34 s. All other examples have total time 2.22 s. I’am running the examples exactly as written in the book. I tried the examples in opposite order, but the rpar/rpar example remains a lot faster.

I wonder why the other examples are so much slower and why is it so different from the book?

I run the examples on a computer with 4 cores. I’am using ghc version 7.10.1 on Win64. The Haskell version is 32 bits. If I run the examples with +RTS –N1 all examples use the same time (2.20 sec).

Kees

_______________________________________________

Haskell-Cafe mailing list

[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe