mirror of
https://github.com/maciej-bendkowski/generic-boltzmann-brain.git
synced 2024-09-11 12:48:09 +03:00
Evaluate to normal form in benchmarks.
This commit is contained in:
parent
6ed4956c34
commit
e186b51c0b
@ -2,8 +2,7 @@
|
||||
|
||||
import BinTree (BinTree)
|
||||
import BinTreeSampler (mediumRandomBinTreeListIO, randomBinTreeListIO)
|
||||
import Control.Monad (replicateM)
|
||||
import Criterion.Main (bench, defaultMain, whnfIO)
|
||||
import Criterion.Main (bench, defaultMain, nfIO)
|
||||
|
||||
sampler :: Int -> IO [BinTree]
|
||||
sampler = randomBinTreeListIO 800 1200
|
||||
@ -14,6 +13,6 @@ mediumSampler = mediumRandomBinTreeListIO 8_000 12_000
|
||||
main :: IO ()
|
||||
main =
|
||||
defaultMain
|
||||
[ bench "100 binary trees" $ whnfIO (sampler 100)
|
||||
, bench "100 large binary trees" $ whnfIO (mediumSampler 100)
|
||||
[ bench "100 binary trees" $ nfIO (sampler 100)
|
||||
, bench "100 large binary trees" $ nfIO (mediumSampler 100)
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user