20 Dec
2008
20 Dec
'08
12:31 a.m.
On Fri, Dec 19, 2008 at 2:27 PM, Paul Keir <pkeir@dcs.gla.ac.uk> wrote:
I'm seeing no performance increase with a simple coarse-grained 2-thread code using Control.Concurrent. I compile with:
I didn't test your code, but [...]
fibs = 0 : 1 : zipWith (+) fibs (tail fibs) heavytask m = putMVar m (fibs !! 100000) [...]
probably fibs is being calculated only once, so just one thread calculates (fibs !! 100000) while others just keep waiting for the result. -- Felipe.