Commit 916de922 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢

Add benchmarks for deleteLargestM

parent 16181a9c
......@@ -5,10 +5,12 @@ import Criterion.Main
import qualified MA.Coalgebra.BenchParser
import qualified MA.Functors.BenchMonoidValued
import qualified MA.Parser.BenchLexer
import qualified Data.List.BenchUtils
main :: IO ()
main = defaultMain
[ MA.Coalgebra.BenchParser.benchmarks
, MA.Functors.BenchMonoidValued.benchmarks
, MA.Parser.BenchLexer.benchmarks
, Data.List.BenchUtils.benchmarks
]
module Data.List.BenchUtils (benchmarks) where
import Criterion
import Control.Monad.ST
import Data.List.Utils
benchmarks :: Benchmark
benchmarks = bgroup "Data.List.Utils"
[ benchDeleteLargestM
]
benchDeleteLargestM :: Benchmark
benchDeleteLargestM = bgroup "deleteLargestM"
[ bench "5" $ nf (deleteLargestM Just) [1,4,2,5,0]
, bench "100" $ nf (deleteLargestM Just) [0..100]
, bench "st 5" $ nfIO (stToIO $ deleteLargestM return [1,4,2,5,0])
, bench "st 100" $ nfIO (stToIO $ deleteLargestM return [0..100])
]
......@@ -186,6 +186,7 @@ benchmark bench
other-modules: MA.Coalgebra.BenchParser
, MA.Functors.BenchMonoidValued
, MA.Parser.BenchLexer
, Data.List.BenchUtils
default-extensions: GADTs
, StandaloneDeriving
, DeriveFunctor
......
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