Skip to content

Commit

Permalink
Fix benchmarks for newer mwc-random
Browse files Browse the repository at this point in the history
  • Loading branch information
axman6 committed May 3, 2024
1 parent 943cd9f commit 82ca397
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bench/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ import Control.Foldl.Statistics
-- Test sample
{-# NOINLINE sample #-}
sample :: U.Vector Double
sample = runST $ flip uniformVector 10000 =<< create
sample = runST $ do
g <- create
U.replicateM 10000 (uniformRM (-10.0,10.0) g)

{-# NOINLINE sample2 #-}
sample2 :: U.Vector (Double,Double)
sample2 = runST $ flip uniformVector 10000 =<< create
sample2 = runST $ do
g <- create
U.replicateM 10000 (liftA2 (,) (uniformRM (-10.0,10.0) g) (uniformRM (0.2,5.0) g))

{-# NOINLINE absSample #-}
absSample :: U.Vector Double
Expand Down

0 comments on commit 82ca397

Please sign in to comment.