Commit 7e153b9e authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢

Fix benchmarks compilation

parent 64a0d6b4
......@@ -5,6 +5,7 @@ module Data.BenchRefinablePartition (benchmarks) where
import Criterion
import Control.Monad.ST
import Data.Ord (comparing)
import Control.DeepSeq
......@@ -18,21 +19,21 @@ benchGroupBy :: Benchmark
benchGroupBy = bgroup
"groupBy"
[ bench "10 states, already sorted"
$ withInit (make 10 1 (const 0)) (\p -> groupBy p 0 id)
$ withInit (make 10 1 (const 0)) (\p -> groupBy p 0 (comparing id))
, bench "20 states, already sorted"
$ withInit (make 20 1 (const 0)) (\p -> groupBy p 0 id)
$ withInit (make 20 1 (const 0)) (\p -> groupBy p 0 (comparing id))
, bench "100 states, already sorted"
$ withInit (make 100 1 (const 0)) (\p -> groupBy p 0 id)
$ withInit (make 100 1 (const 0)) (\p -> groupBy p 0 (comparing id))
, bench "1000 states, already sorted"
$ withInit (make 1000 1 (const 0)) (\p -> groupBy p 0 id)
$ withInit (make 1000 1 (const 0)) (\p -> groupBy p 0 (comparing id))
, bench "10 states, reversed"
$ withInit (make 10 1 (const 0)) (\p -> groupBy p 0 negate)
$ withInit (make 10 1 (const 0)) (\p -> groupBy p 0 (comparing negate))
, bench "20 states, reversed"
$ withInit (make 20 1 (const 0)) (\p -> groupBy p 0 negate)
$ withInit (make 20 1 (const 0)) (\p -> groupBy p 0 (comparing negate))
, bench "100 states, reversed"
$ withInit (make 100 1 (const 0)) (\p -> groupBy p 0 negate)
$ withInit (make 100 1 (const 0)) (\p -> groupBy p 0 (comparing negate))
, bench "1000 states, reversed"
$ withInit (make 1000 1 (const 0)) (\p -> groupBy p 0 negate)
$ withInit (make 1000 1 (const 0)) (\p -> groupBy p 0 (comparing negate))
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment