mirror of
https://github.com/haskell-effectful/effectful.git
synced 2024-11-23 06:22:28 +03:00
Separate primary and extra countdown benchmarks
This commit is contained in:
parent
46ae928e71
commit
810c64358f
@ -20,18 +20,13 @@ main = defaultMain
|
||||
[ concurrencyBenchmark
|
||||
, unliftBenchmark
|
||||
, bgroup "countdown" $ map countdown [1000, 2000, 3000]
|
||||
, bgroup "filesize" $ map filesize [1000, 2000, 3000]
|
||||
, bgroup "countdown (extra)" $ map countdownExtra [1000, 2000, 3000]
|
||||
, bgroup "filesize" $ map filesize [1000, 2000, 3000]
|
||||
]
|
||||
|
||||
countdown :: Integer -> Benchmark
|
||||
countdown n = bgroup (show n)
|
||||
[ bench "reference (pure)" $ nf countdownRef n
|
||||
, bench "reference (ST)" $ nf countdownST n
|
||||
, bgroup "effectful (local/static)"
|
||||
[ bench "shallow" $ nf countdownEffectfulLocal n
|
||||
, bench "deep" $ nf countdownEffectfulLocalDeep n
|
||||
]
|
||||
, bgroup "effectful (local/static/state)"
|
||||
countdownExtra :: Integer -> Benchmark
|
||||
countdownExtra n = bgroup (show n)
|
||||
[ bgroup "effectful (local/static/state)"
|
||||
[ bench "shallow" $ nf countdownEffectfulLocalSt n
|
||||
, bench "deep" $ nf countdownEffectfulLocalDeepSt n
|
||||
]
|
||||
@ -39,14 +34,28 @@ countdown n = bgroup (show n)
|
||||
[ bench "shallow" $ nf countdownEffectfulLocalStM n
|
||||
, bench "deep" $ nf countdownEffectfulLocalDeepStM n
|
||||
]
|
||||
, bgroup "effectful (local/dynamic)"
|
||||
[ bench "shallow" $ nf countdownEffectfulDynLocal n
|
||||
, bench "deep" $ nf countdownEffectfulDynLocalDeep n
|
||||
]
|
||||
, bgroup "effectful (local/dynamic/double)"
|
||||
[ bench "shallow" $ nf countdownEffectfulDoubleDynLocal n
|
||||
, bench "deep" $ nf countdownEffectfulDoubleDynLocalDeep n
|
||||
]
|
||||
, bgroup "effectful (shared/dynamic/double)"
|
||||
[ bench "shallow" $ nf countdownEffectfulDoubleDynShared n
|
||||
, bench "deep" $ nf countdownEffectfulDoubleDynSharedDeep n
|
||||
]
|
||||
]
|
||||
|
||||
countdown :: Integer -> Benchmark
|
||||
countdown n = bgroup (show n)
|
||||
[ bench "reference (pure)" $ nf countdownRef n
|
||||
, bench "reference (ST)" $ nf countdownST n
|
||||
, bgroup "effectful (local/static)"
|
||||
[ bench "shallow" $ nf countdownEffectfulLocal n
|
||||
, bench "deep" $ nf countdownEffectfulLocalDeep n
|
||||
]
|
||||
, bgroup "effectful (local/dynamic)"
|
||||
[ bench "shallow" $ nf countdownEffectfulDynLocal n
|
||||
, bench "deep" $ nf countdownEffectfulDynLocalDeep n
|
||||
]
|
||||
, bgroup "effectful (shared/static)"
|
||||
[ bench "shallow" $ nf countdownEffectfulShared n
|
||||
, bench "deep" $ nf countdownEffectfulSharedDeep n
|
||||
@ -55,10 +64,6 @@ countdown n = bgroup (show n)
|
||||
[ bench "shallow" $ nf countdownEffectfulDynShared n
|
||||
, bench "deep" $ nf countdownEffectfulDynSharedDeep n
|
||||
]
|
||||
, bgroup "effectful (shared/dynamic/double)"
|
||||
[ bench "shallow" $ nf countdownEffectfulDoubleDynShared n
|
||||
, bench "deep" $ nf countdownEffectfulDoubleDynSharedDeep n
|
||||
]
|
||||
#ifdef VERSION_cleff
|
||||
, bgroup "cleff (local)"
|
||||
[ bench "shallow" $ nf countdownCleffLocal n
|
||||
|
Loading…
Reference in New Issue
Block a user