git.iko.soy/effects-benchmarks
on master help sign in
Add tldr.
33f4e05Patrick Thomson
README.md+9−5
@@ -2,7 +2,11 @@
2
2
3This is a set of memory and time benchmarks for the various Haskell effects libraries, including `fused-effects`, `polysemy`, `freer-simple`, and `extensible-effects`. Benchmarks for equivalent `mtl` and handwritten computations are included for comparison purposes. It uses Cabal's new Backpack feature to save a great deal of boilerplate code.
3This is a set of memory and time benchmarks for the various Haskell effects libraries, including `fused-effects`, `polysemy`, `freer-simple`, and `extensible-effects`. Benchmarks for equivalent `mtl` and handwritten computations are included for comparison purposes. It uses Cabal's new Backpack feature to save a great deal of boilerplate code.
4
4
5+# tl;dr
6+
7+`fused-effects` and `mtl` achieve roughly commensurate performance. `polysemy` is within an order of magnitude of `fused-effects` and `mtl`. `freer-simple` and `extensible-effects` are considerably slower.
8+
5−# Some results
9+# Full results
6
10
7On a 15-inch 2017 MacBook Pro (3.1GHz Intel i7, 16GB RAM), here are results for space benchmarks:
11On a 15-inch 2017 MacBook Pro (3.1GHz Intel i7, 16GB RAM), here are results for space benchmarks:
8
12
@@ -28,6 +32,8 @@ Countdown + exc
28 shallow 320
32 shallow 320
29```
33```
30
34
35+(The fact that `fused-effects` and `mtl` have the same allocations is not an error; `fused-effects` was designed to have almost identical performance characteristics to `mtl`.)
36+
31Time (`State`-based countdown):
37Time (`State`-based countdown):
32
38
33```
39```
@@ -36,11 +42,9 @@ time 5.692 μs (5.570 μs .. 5.835 μs)
36
42
37benchmarked Countdown/Put/mtl
43benchmarked Countdown/Put/mtl
38time 5.500 μs (5.386 μs .. 5.719 μs)
44time 5.500 μs (5.386 μs .. 5.719 μs)
39−variance introduced by outliers: 35% (moderately inflated)
40
45
41benchmarked Countdown/Put/polysemy
46benchmarked Countdown/Put/polysemy
42time 1.903 ms (1.845 ms .. 1.954 ms)
47time 1.903 ms (1.845 ms .. 1.954 ms)
43−variance introduced by outliers: 72% (severely inflated)
44
48
45benchmarked Countdown/Put/freer-simple
49benchmarked Countdown/Put/freer-simple
46time 1.324 ms (1.282 ms .. 1.361 ms)
50time 1.324 ms (1.282 ms .. 1.361 ms)
@@ -97,5 +101,5 @@ time 1.478 ms (1.443 ms .. 1.515 ms)
97```
101```
98
102
99# Future work
103# Future work
100−
104+* More benchmarks: `Writer`, logging, `grammar`, `pipes`
101−I am going to make this emit pretty graphs, or at least graphable .csv files, someday.
105+* I am going to make this emit pretty graphs, or at least graphable .csv files, someday.