git.iko.soy/effects-benchmarks
on master help sign in
Updated benchmarks
commitedf18f25e764278aa2c2872cad58f5b2071bd2d4 authoriko <ilyakooo0@gmail.com> dateThu 21 Jan 2021, 13:05 (6 years ago) parent7a1ce61
24 files changed+225−235
effects-benchmarks.cabal+5 hie.yaml+7 instances/ExtEff/Bench.hs+21 instances/ExtEff/HTTP.hs+2−2 instances/ExtEff/Stateful.hs+5−16 instances/ExtEff/StatefulExcept.hs+5−19 instances/Freer/Bench.hs+21 instances/Freer/HTTP.hs+2−2 instances/Freer/Stateful.hs+4−15 instances/Freer/StatefulExcept.hs+4−19 instances/Fused/Bench.hs+20 instances/Fused/HTTP.hs+2−2 instances/Fused/Stateful.hs+3−16 instances/Fused/StatefulExcept.hs+5−18 instances/MTL/Bench.hs+20 instances/MTL/HTTP.hs+2−2 instances/MTL/Stateful.hs+4−17 instances/MTL/StatefulExcept.hs+5−21 instances/Poly/Bench.hs+21 instances/Poly/HTTP.hs+2−2 instances/Poly/Stateful.hs+5−15 instances/Poly/StatefulExcept.hs+6−19 instances/Shallow/Bench.hs+18 src/Main.hs+36−50
effects-benchmarks.cabal+5
@@ -18,18 +18,23 @@ benchmark effects-benchmarks
1818 ExtEff.HTTP
1919 ExtEff.Stateful
2020 ExtEff.StatefulExcept
21+ Freer.Bench
2122 Freer.HTTP
2223 Freer.Stateful
2324 Freer.StatefulExcept
25+ Fused.Bench
2426 Fused.HTTP
2527 Fused.Stateful
2628 Fused.StatefulExcept
29+ MTL.Bench
2730 MTL.HTTP
2831 MTL.Stateful
2932 MTL.StatefulExcept
33+ Poly.Bench
3034 Poly.HTTP
3135 Poly.Stateful
3236 Poly.StatefulExcept
37+ Shallow.Bench
3338 Shallow.HTTP
3439 Shallow.Stateful
3540 Shallow.StatefulExcept
hie.yamlnew file+7
@@ -0,0 +1,7 @@
1+cradle:
2+ stack:
3+ - path: "./instances"
4+ component: "effects-benchmarks:bench:effects-benchmarks"
5+
6+ - path: "./src/Main.hs"
7+ component: "effects-benchmarks:bench:effects-benchmarks"
instances/ExtEff/Bench.hsnew file+21
@@ -0,0 +1,21 @@
1+module ExtEff.Bench
2+ ( countDownBench
3+ , countDownExcBench
4+ , httpBench
5+ ) where
6+
7+import ExtEff.Stateful
8+import ExtEff.StatefulExcept
9+import ExtEff.HTTP
10+import Control.Eff.State.Strict
11+import Control.Eff.Exception
12+import Control.Eff
13+
14+countDownBench :: Int -> (Int, Int)
15+countDownBench start = run . runState start $ countDownPut
16+
17+countDownExcBench :: Int -> Either String (Int, Int)
18+countDownExcBench start = run . runError . runState start $ countDownExc
19+
20+httpBench :: Int -> IO Int
21+httpBench n = runHttp (doHTTP n)
instances/ExtEff/HTTP.hs+2−2
@@ -40,8 +40,8 @@ doHttp = fix (handle_relay pure)
4040runHttp :: HttpM a -> IO a
4141runHttp = runLift . doHttp
4242
43−doHTTP :: Int -> IO Int
44−doHTTP n = runHttp $ do
43+doHTTP :: Int -> Eff '[HTTP, Lift IO] Int
44+doHTTP n = do
4545 open' "cats"
4646 replicateM_ n (get' *> post' "cats")
4747 close'
instances/ExtEff/Stateful.hs+5−16
@@ -1,22 +1,11 @@
1+{-# LANGUAGE MonoLocalBinds #-}
2+{-# LANGUAGE FlexibleContexts #-}
13{-# LANGUAGE DataKinds, TypeApplications #-}
24
35module ExtEff.Stateful where
46
57import Control.Eff
6−import Control.Eff.State.Strict as State
7−import Data.Tuple
8+import Control.Eff.State.Strict
89
9−type StateM = Eff '[State Int]
10−
11−get' :: StateM Int
12−get' = State.get @Int
13−
14−put' :: Int -> StateM ()
15−put' = State.put @Int
16−
17−runStateful :: Int -> StateM a -> (Int, a)
18−runStateful n x = swap . run $ State.runState n x
19−
20−countDownPut :: Int -> (Int, Int)
21−countDownPut start = runStateful start go where
22− go = get' >>= (\n -> if n < 0 then pure n else put' (n - 1) *> go)
10+countDownPut :: Member (State Int) r => Eff r Int
11+countDownPut = get >>= (\n -> if n < 0 then pure n else put (n - 1) *> countDownPut)
instances/ExtEff/StatefulExcept.hs+5−19
@@ -1,25 +1,11 @@
1+{-# LANGUAGE MonoLocalBinds #-}
2+{-# LANGUAGE FlexibleContexts #-}
13{-# LANGUAGE TypeApplications, DataKinds #-}
24module ExtEff.StatefulExcept where
35
46import Control.Eff
5−import Control.Eff.State.Strict as State
7+import Control.Eff.State.Strict
68import Control.Eff.Exception
7−import Data.Tuple
89
9−type StateM = Eff '[State Int, Exc String]
10−
11−get' :: StateM Int
12−get' = State.get @Int
13−
14−put' :: Int -> StateM ()
15−put' = State.put @Int
16−
17−throw :: String -> StateM a
18−throw = throwError
19−
20−runStatefulExcept :: Int -> StateM a -> Either String (Int, a)
21−runStatefulExcept n x = fmap swap . run . runError $ State.runState n x
22−
23−countDownExc :: Int -> Either String (Int, Int)
24−countDownExc start = runStatefulExcept start go where
25− go = get' >>= (\n -> if n <= 0 then throw "what" else put' (n - 1) *> go)
10+countDownExc :: (Member (State Int) r, Member (Exc String) r) => Eff r b
11+countDownExc = get @Int >>= (\n -> if n <= 0 then throwError "what" else put @Int (n - 1) *> countDownExc)
instances/Freer/Bench.hsnew file+21
@@ -0,0 +1,21 @@
1+module Freer.Bench
2+ ( countDownBench
3+ , countDownExcBench
4+ , httpBench
5+ ) where
6+
7+import Freer.Stateful
8+import Freer.StatefulExcept
9+import Freer.HTTP
10+import Control.Monad.Freer.State
11+import Control.Monad.Freer.Error
12+import Control.Monad.Freer
13+
14+countDownBench :: Int -> (Int, Int)
15+countDownBench start = run . runState start $ countDownPut
16+
17+countDownExcBench :: Int -> Either String (Int, Int)
18+countDownExcBench start = run . runError . runState start $ countDownExc
19+
20+httpBench :: Int -> IO Int
21+httpBench n = runHttp (doHTTP n)
instances/Freer/HTTP.hs+2−2
@@ -36,8 +36,8 @@ doHttp = interpret
3636runHttp :: HttpM a -> IO a
3737runHttp = runM . doHttp
3838
39−doHTTP :: Int -> IO Int
40−doHTTP n = runHttp $ do
39+doHTTP :: Int -> Eff '[HTTP, IO] Int
40+doHTTP n = do
4141 open' "cats"
4242 replicateM_ n (get' *> post' "cats")
4343 close'
instances/Freer/Stateful.hs+4−15
@@ -1,22 +1,11 @@
1+{-# LANGUAGE MonoLocalBinds #-}
2+{-# LANGUAGE FlexibleContexts #-}
13{-# LANGUAGE TypeApplications, DataKinds #-}
24
35module Freer.Stateful where
46
57import Control.Monad.Freer
68import Control.Monad.Freer.State as State
7−import Data.Tuple
89
9−type StateM = Eff '[State Int]
10−
11−get' :: StateM Int
12−get' = State.get @Int
13−
14−put' :: Int -> StateM ()
15−put' = State.put @Int
16−
17−runStateful :: Int -> StateM a -> (Int, a)
18−runStateful n x = swap . run $ State.runState n x
19−
20−countDownPut :: Int -> (Int, Int)
21−countDownPut start = runStateful start go where
22− go = get' >>= (\n -> if n < 0 then pure n else put' (n - 1) *> go)
10+countDownPut :: Member (State Int) r => Eff r Int
11+countDownPut = get >>= (\n -> if n < 0 then pure n else put (n - 1) *> countDownPut)
instances/Freer/StatefulExcept.hs+4−19
@@ -2,24 +2,9 @@
22module Freer.StatefulExcept where
33
44import Control.Monad.Freer
5−import Control.Monad.Freer.State as State
5+import Control.Monad.Freer.State
66import Control.Monad.Freer.Error
7−import Data.Tuple
87
9−type StateM = Eff '[State Int, Error String]
10−
11−get' :: StateM Int
12−get' = State.get @Int
13−
14−put' :: Int -> StateM ()
15−put' = State.put @Int
16−
17−throw :: String -> StateM a
18−throw = throwError
19−
20−runStatefulExcept :: Int -> StateM a -> Either String (Int, a)
21−runStatefulExcept n x = fmap swap . run . runError $ State.runState n x
22−
23−countDownExc :: Int -> Either String (Int, Int)
24−countDownExc start = runStatefulExcept start go where
25− go = get' >>= (\n -> if n <= 0 then throw "what" else put' (n - 1) *> go)
8+countDownExc :: Eff '[State Int, Error String] b
9+countDownExc = go where
10+ go = get @Int >>= (\n -> if n <= 0 then throwError "what" else put @Int (n - 1) *> go)
instances/Fused/Bench.hsnew file+20
@@ -0,0 +1,20 @@
1+module Fused.Bench
2+ ( countDownBench
3+ , countDownExcBench
4+ , httpBench
5+ ) where
6+
7+import Fused.Stateful
8+import Fused.StatefulExcept
9+import Fused.HTTP
10+import Control.Carrier.State.Strict
11+import Control.Carrier.Error.Either
12+
13+countDownBench :: Int -> (Int, Int)
14+countDownBench start = run . runState start $ countDownPut
15+
16+countDownExcBench :: Int -> Either String (Int, Int)
17+countDownExcBench start = run . runError . runState start $ countDownExc
18+
19+httpBench :: Int -> IO Int
20+httpBench n = runHttp (doHTTP n)
instances/Fused/HTTP.hs+2−2
@@ -45,8 +45,8 @@ instance (Effect sig, Algebra sig m) => Algebra (HTTP :+: sig) (HttpC m) where
4545runHttp :: HttpM a -> IO a
4646runHttp = runM . runHttpC
4747
48−doHTTP :: Int -> IO Int
49−doHTTP n = runHttp $ do
48+doHTTP :: Int -> HttpC (LiftC IO) Int
49+doHTTP n = do
5050 open' "cats"
5151 replicateM_ n (get' *> post' "cats")
5252 close'
instances/Fused/Stateful.hs+3−16
@@ -2,20 +2,7 @@
22
33module Fused.Stateful where
44
5−import Control.Carrier.State.Lazy as State
6−import Data.Functor.Identity
5+import Control.Effect.State
76
8−type StateM = StateC Int Identity
9−
10−get' :: StateM Int
11−get' = State.get @Int
12−
13−put' :: Int -> StateM ()
14−put' = State.put @Int
15−
16−runStateful :: Int -> StateM a -> (Int, a)
17−runStateful n x = run $ State.runState n x
18−
19−countDownPut :: Int -> (Int, Int)
20−countDownPut start = runStateful start go where
21− go = get' >>= (\n -> if n < 0 then pure n else put' (n - 1) *> go)
7+countDownPut :: Has (State Int) sig m => m Int
8+countDownPut = get >>= (\n -> if n < 0 then pure n else put (n - 1) *> countDownPut)
instances/Fused/StatefulExcept.hs+5−18
@@ -2,24 +2,11 @@
22
33module Fused.StatefulExcept where
44
5−import Control.Carrier.State.Strict as State
6−import Control.Carrier.Error.Either
7−import Data.Functor.Identity
85
9−type StateM = StateC Int (ErrorC String Identity)
6+import Control.Effect.Error
7+import Control.Effect.State
108
11−get' :: StateM Int
12−get' = State.get @Int
139
14−put' :: Int -> StateM ()
15−put' = State.put @Int
16−
17−throw :: String -> StateM a
18−throw = throwError
19−
20−runStatefulExcept :: Int -> StateM a -> Either String (Int, a)
21−runStatefulExcept n x = run . runError $ State.runState n x
22−
23−countDownExc :: Int -> Either String (Int, Int)
24−countDownExc start = runStatefulExcept start go where
25− go = get' >>= (\n -> if n <= 0 then throw "what" else put' (n - 1) *> go)
10+countDownExc :: (Has (State Int) sig m, Has (Error String) sig m) => m a
11+countDownExc =
12+ get @Int >>= (\n -> if n <= 0 then throwError "what" else put @Int (n - 1) *> countDownExc)
instances/MTL/Bench.hsnew file+20
@@ -0,0 +1,20 @@
1+module MTL.Bench
2+ ( countDownBench
3+ , countDownExcBench
4+ , httpBench
5+ ) where
6+
7+import MTL.Stateful
8+import MTL.StatefulExcept
9+import MTL.HTTP
10+import Control.Monad.State.Strict
11+import Control.Monad.Except
12+
13+countDownBench :: Int -> (Int, Int)
14+countDownBench start = flip runState start $ countDownPut
15+
16+countDownExcBench :: Int -> Either String (Int, Int)
17+countDownExcBench start = runExcept . flip runStateT start $ countDownExc
18+
19+httpBench :: Int -> IO Int
20+httpBench n = runHttp (doHTTP n)
instances/MTL/HTTP.hs+2−2
@@ -46,8 +46,8 @@ runHttp = \case
4646 Post s -> pure ("posted " <> s)
4747 HGet -> pure "lmap"
4848
49−doHTTP :: Int -> IO Int
50−doHTTP n = runHttp $ do
49+doHTTP :: Int -> HttpM Int
50+doHTTP n = do
5151 open' "cats"
5252 replicateM_ n (get' *> post' "cats")
5353 close'
instances/MTL/Stateful.hs+4−17
@@ -1,20 +1,7 @@
1+{-# LANGUAGE FlexibleContexts #-}
12module MTL.Stateful where
23
3−import qualified Control.Monad.State.Strict as MTL
4−import Data.Tuple
5−import Data.Functor.Identity
4+import Control.Monad.State.Class
65
7−type StateM = MTL.StateT Int Identity
8−
9−get :: StateM Int
10−get = MTL.get
11−
12−put :: Int -> StateM ()
13−put = MTL.put
14−
15−runStateful :: Int -> StateM a -> (Int, a)
16−runStateful n x = swap (MTL.runState x n)
17−
18−countDownPut :: Int -> (Int, Int)
19−countDownPut start = runStateful start go where
20− go = get >>= (\n -> if n < 0 then pure n else put (n - 1) *> go)
6+countDownPut :: MonadState Int m => m Int
7+countDownPut = get >>= (\n -> if n < 0 then pure n else put (n - 1) *> countDownPut)
instances/MTL/StatefulExcept.hs+5−21
@@ -1,24 +1,8 @@
1+{-# LANGUAGE FlexibleContexts #-}
12module MTL.StatefulExcept where
23
3−import qualified Control.Monad.State.Strict as MTL
4−import qualified Control.Monad.Except as MTL
5−import Data.Tuple
6−import Data.Functor.Identity
4+import Control.Monad.State.Class
5+import Control.Monad.Error.Class
76
8−type StateM = MTL.StateT Int (MTL.ExceptT String Identity)
9−
10−get :: StateM Int
11−get = MTL.get
12−
13−put :: Int -> StateM ()
14−put = MTL.put
15−
16−throw :: String -> StateM a
17−throw = MTL.throwError
18−
19−runStatefulExcept :: Int -> StateM a -> Either String (Int, a)
20−runStatefulExcept n x = fmap swap . MTL.runExcept $ MTL.runStateT x n
21−
22−countDownExc :: Int -> Either String (Int, Int)
23−countDownExc start = runStatefulExcept start go where
24− go = get >>= (\n -> if n <= 0 then throw "what" else put (n - 1) *> go)
7+countDownExc :: (MonadState Int m, MonadError String m) => m a
8+countDownExc = get >>= (\n -> if n <= 0 then throwError "what" else put (n - 1) *> countDownExc)
instances/Poly/Bench.hsnew file+21
@@ -0,0 +1,21 @@
1+module Poly.Bench
2+ ( countDownBench
3+ , countDownExcBench
4+ , httpBench
5+ ) where
6+
7+import Poly.Stateful
8+import Poly.StatefulExcept
9+import Poly.HTTP
10+import Polysemy.State
11+import Polysemy
12+import Polysemy.Error
13+
14+countDownBench :: Int -> (Int, Int)
15+countDownBench start = run . runState start $ countDownPut
16+
17+countDownExcBench :: Int -> Either String (Int, Int)
18+countDownExcBench start = run . runError . runState start $ countDownExc
19+
20+httpBench :: Int -> IO Int
21+httpBench n = runHttp (doHTTP n)
instances/Poly/HTTP.hs+2−2
@@ -37,8 +37,8 @@ runHttp' = interpret $ \case
3737runHttp :: HttpM a -> IO a
3838runHttp = runFinal . runHttp'
3939
40−doHTTP :: Int -> IO Int
41−doHTTP n = runHttp $ do
40+doHTTP :: Int -> Sem '[Http, Final IO] Int
41+doHTTP n = do
4242 open' "cats"
4343 replicateM_ n (get' *> post' "cats")
4444 close'
instances/Poly/Stateful.hs+5−15
@@ -1,21 +1,11 @@
1+{-# LANGUAGE GADTs #-}
2+{-# LANGUAGE FlexibleContexts #-}
13{-# LANGUAGE DataKinds, TypeApplications #-}
24
35module Poly.Stateful where
46
57import Polysemy
6−import Polysemy.State as State
8+import Polysemy.State
79
8−type StateM = Sem '[State Int]
9−
10−get' :: StateM Int
11−get' = State.get @Int
12−
13−put' :: Int -> StateM ()
14−put' = State.put @Int
15−
16−runStateful :: Int -> StateM a -> (Int, a)
17−runStateful n x = run $ State.runState n x
18−
19−countDownPut :: Int -> (Int, Int)
20−countDownPut start = runStateful start go where
21− go = get' >>= (\n -> if n < 0 then pure n else put' (n - 1) *> go)
10+countDownPut :: Member (State Int) r => Sem r Int
11+countDownPut = get >>= (\n -> if n < 0 then pure n else put (n - 1) *> countDownPut)
instances/Poly/StatefulExcept.hs+6−19
@@ -1,24 +1,11 @@
1+{-# LANGUAGE GADTs #-}
2+{-# LANGUAGE FlexibleContexts #-}
13{-# LANGUAGE TypeApplications, DataKinds #-}
24module Poly.StatefulExcept where
35
46import Polysemy
5−import Polysemy.State as State
6−import Polysemy.Error as Err
7+import Polysemy.State
8+import Polysemy.Error
79
8−type StateM = Sem '[State Int, Error String]
9−
10−get' :: StateM Int
11−get' = State.get @Int
12−
13−put' :: Int -> StateM ()
14−put' = State.put @Int
15−
16−throw' :: String -> StateM a
17−throw' = Err.throw
18−
19−runStatefulExcept :: Int -> StateM a -> Either String (Int, a)
20−runStatefulExcept n x = run . runError $ State.runState n x
21−
22−countDownExc :: Int -> Either String (Int, Int)
23−countDownExc start = runStatefulExcept start go where
24− go = get' >>= (\n -> if n <= 0 then throw' "what" else put' (n - 1) *> go)
10+countDownExc :: (Member (State Int) r, Member (Error String) r) => Sem r a
11+countDownExc = get @Int >>= (\n -> if n <= 0 then throw "what" else put @Int (n - 1) *> countDownExc)
instances/Shallow/Bench.hsnew file+18
@@ -0,0 +1,18 @@
1+module Shallow.Bench
2+ ( countDownBench
3+ , countDownExcBench
4+ , httpBench
5+ ) where
6+
7+import Shallow.Stateful
8+import Shallow.StatefulExcept
9+import Shallow.HTTP
10+
11+countDownBench :: Int -> (Int, Int)
12+countDownBench = countDownPut
13+
14+countDownExcBench :: Int -> Either String (Int, Int)
15+countDownExcBench = countDownExc
16+
17+httpBench :: Int -> IO Int
18+httpBench = doHTTP
src/Main.hs+36−50
@@ -6,26 +6,12 @@ import Gauge (bench, bgroup, nf, nfAppIO)
66import Gauge.Main (defaultMain)
77import qualified Weigh
88
9−import qualified Fused.Stateful as Fused
10−import qualified Freer.Stateful as Freer
11−import qualified Shallow.Stateful as Shallow
12−import qualified MTL.Stateful as MTL
13−import qualified Poly.Stateful as Poly
14−import qualified ExtEff.Stateful as ExtEff
15−
16−import qualified Fused.StatefulExcept as Fused
17−import qualified Freer.StatefulExcept as Freer
18−import qualified Shallow.StatefulExcept as Shallow
19−import qualified MTL.StatefulExcept as MTL
20−import qualified Poly.StatefulExcept as Poly
21−import qualified ExtEff.StatefulExcept as ExtEff
22−
23−import qualified Fused.HTTP as Fused
24−import qualified Freer.HTTP as Freer
25−import qualified MTL.HTTP as MTL
26−import qualified Shallow.HTTP as Shallow
27−import qualified Poly.HTTP as Poly
28−import qualified ExtEff.HTTP as ExtEff
9+import qualified Fused.Bench as Fused
10+import qualified Freer.Bench as Freer
11+import qualified Shallow.Bench as Shallow
12+import qualified MTL.Bench as MTL
13+import qualified Poly.Bench as Poly
14+import qualified ExtEff.Bench as ExtEff
2915
3016wruns :: Int
3117wruns = 1
@@ -40,47 +26,47 @@ main = do
4026 [
4127 bgroup "Countdown"
4228 [ bgroup "Put"
43− [ bench "fused-effects" (nf Fused.countDownPut runs)
44− , bench "mtl" (nf MTL.countDownPut runs)
45− , bench "polysemy" (nf Poly.countDownPut runs)
46− , bench "freer-simple" (nf Freer.countDownPut runs)
47− , bench "extensible-effects" (nf ExtEff.countDownPut runs)
48− , bench "shallow" (nf Shallow.countDownPut runs)
29+ [ bench "fused-effects" (nf Fused.countDownBench runs)
30+ , bench "mtl" (nf MTL.countDownBench runs)
31+ , bench "polysemy" (nf Poly.countDownBench runs)
32+ , bench "freer-simple" (nf Freer.countDownBench runs)
33+ , bench "extensible-effects" (nf ExtEff.countDownBench runs)
34+ , bench "shallow" (nf Shallow.countDownBench runs)
4935 ]
5036 , bgroup "Put+Exc"
51− [ bench "fused-effects" (nf Fused.countDownExc runs)
52− , bench "mtl" (nf MTL.countDownExc runs)
53− , bench "polysemy" (nf Poly.countDownExc runs)
54− , bench "freer-simple" (nf Freer.countDownExc runs)
55− , bench "extensible-effects" (nf ExtEff.countDownExc runs)
56− , bench "shallow" (nf Shallow.countDownExc runs)
37+ [ bench "fused-effects" (nf Fused.countDownExcBench runs)
38+ , bench "mtl" (nf MTL.countDownExcBench runs)
39+ , bench "polysemy" (nf Poly.countDownExcBench runs)
40+ , bench "freer-simple" (nf Freer.countDownExcBench runs)
41+ , bench "extensible-effects" (nf ExtEff.countDownExcBench runs)
42+ , bench "shallow" (nf Shallow.countDownExcBench runs)
5743 ]
5844 ]
5945 , bgroup "HTTP"
60− [ bench "fused-effects" (nfAppIO Fused.doHTTP runs)
61− , bench "polysemy" (nfAppIO Poly.doHTTP runs)
62− , bench "extensible-effects" (nfAppIO ExtEff.doHTTP runs)
63− , bench "Deep embedding" (nfAppIO MTL.doHTTP runs)
64− , bench "Shallow embedding" (nfAppIO Shallow.doHTTP runs)
65− , bench "freer-simple" (nfAppIO Freer.doHTTP runs)
46+ [ bench "fused-effects" (nfAppIO Fused.httpBench runs)
47+ , bench "polysemy" (nfAppIO Poly.httpBench runs)
48+ , bench "extensible-effects" (nfAppIO ExtEff.httpBench runs)
49+ , bench "Deep embedding" (nfAppIO MTL.httpBench runs)
50+ , bench "Shallow embedding" (nfAppIO Shallow.httpBench runs)
51+ , bench "freer-simple" (nfAppIO Freer.httpBench runs)
6652 ]
6753 ]
6854
6955 putStrLn "*** Space benchmarks (these will take some time to run) ***"
7056 Weigh.mainWith $ do
7157 Weigh.wgroup "Countdown" $ sequence_
72− [ Weigh.func "fused-effects" Fused.countDownPut wruns
73− , Weigh.func "mtl" MTL.countDownPut wruns
74− , Weigh.func "polysemy" Poly.countDownPut wruns
75− , Weigh.func "freer-simple" Freer.countDownPut wruns
76− , Weigh.func "extensible-effects" ExtEff.countDownPut wruns
77− , Weigh.func "shallow" Shallow.countDownPut wruns
58+ [ Weigh.func "fused-effects" Fused.countDownBench wruns
59+ , Weigh.func "mtl" MTL.countDownBench wruns
60+ , Weigh.func "polysemy" Poly.countDownBench wruns
61+ , Weigh.func "freer-simple" Freer.countDownBench wruns
62+ , Weigh.func "extensible-effects" ExtEff.countDownBench wruns
63+ , Weigh.func "shallow" Shallow.countDownBench wruns
7864 ]
7965 Weigh.wgroup "Countdown + exc" $ sequence_
80− [ Weigh.func "fused-effects" Fused.countDownExc wruns
81− , Weigh.func "mtl" MTL.countDownExc wruns
82− , Weigh.func "polysemy" Poly.countDownExc wruns
83− , Weigh.func "freer-simple" Freer.countDownExc wruns
84− , Weigh.func "extensible-effects" ExtEff.countDownExc wruns
85− , Weigh.func "shallow" Shallow.countDownExc wruns
66+ [ Weigh.func "fused-effects" Fused.countDownExcBench wruns
67+ , Weigh.func "mtl" MTL.countDownExcBench wruns
68+ , Weigh.func "polysemy" Poly.countDownExcBench wruns
69+ , Weigh.func "freer-simple" Freer.countDownExcBench wruns
70+ , Weigh.func "extensible-effects" ExtEff.countDownExcBench wruns
71+ , Weigh.func "shallow" Shallow.countDownExcBench wruns
8672 ]