When I run this Haskell fragment, it only gets 1 loaded CPU. Both f and g do not make sense, but should they not load two processors when they are available? Compiled as ghc -O2 snippet.hs .
fx = 1 + (f $! x) gx = 5 + (g $! x) z = a `par` b `seq` a+b where a = f 3 b = g 5 main = do print z
parallel-processing haskell ghc
Cartesius00
source share