Created
August 4, 2013 08:50
-
-
Save nushio3/6149755 to your computer and use it in GitHub Desktop.
threadscope test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Parallel.Strategies | |
fib :: Integer -> Integer | |
fib 0 = 0 | |
fib 1 = 1 | |
fib n = fib (n-1) + fib (n-2) | |
main = do | |
let (rx, ry) = runEval $ do | |
x <- rpar $ fib 38 `seq` (undefined :: Integer) | |
y <- rpar (fib 40) | |
return (x,y) | |
print ry | |
print rx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment