Skip to content

Commit 82ca397

Browse files
committed
Fix benchmarks for newer mwc-random
1 parent 943cd9f commit 82ca397

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bench/Main.hs

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ import Control.Foldl.Statistics
2020
-- Test sample
2121
{-# NOINLINE sample #-}
2222
sample :: U.Vector Double
23-
sample = runST $ flip uniformVector 10000 =<< create
23+
sample = runST $ do
24+
g <- create
25+
U.replicateM 10000 (uniformRM (-10.0,10.0) g)
2426

2527
{-# NOINLINE sample2 #-}
2628
sample2 :: U.Vector (Double,Double)
27-
sample2 = runST $ flip uniformVector 10000 =<< create
29+
sample2 = runST $ do
30+
g <- create
31+
U.replicateM 10000 (liftA2 (,) (uniformRM (-10.0,10.0) g) (uniformRM (0.2,5.0) g))
2832

2933
{-# NOINLINE absSample #-}
3034
absSample :: U.Vector Double

0 commit comments

Comments
 (0)