Created
November 15, 2012 01:49
-
-
Save evrim/4076142 to your computer and use it in GitHub Desktop.
parallel & tail recursive vectorSpace
This file contains 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
vectorSpace_F2'' 0 acc = acc | |
vectorSpace_F2'' n acc = vectorSpace_F2'' (n-1) $ concatMap f acc | |
where f x = a `par` [a,(Bir:x)] | |
where a = (Sifir:x) | |
vvectorSpace_F2 n = vectorSpace_F2'' n [[Sifir],[Bir]] | |
main = do | |
print $ length $ vvectorSpace_F2 $ 2^5 | |
evrim@evrim ~/haskell $ time ./crypto +RTS -K1G -M2G -N4 -RTS | |
8589934592 | |
real 32m42.499s | |
user 55m11.760s | |
sys 6m40.270s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment