@@ -2,7 +2,11 @@
22
33This 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.
44
5−# Some results
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+
9+# Full results
610
711On a 15-inch 2017 MacBook Pro (3.1GHz Intel i7, 16GB RAM), here are results for space benchmarks:
812
@@ -28,6 +32,8 @@ Countdown + exc
2832 shallow 320
2933```
3034
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+
3137Time (`State`-based countdown):
3238
3339```
@@ -36,11 +42,9 @@ time 5.692 μs (5.570 μs .. 5.835 μs)
3642
3743benchmarked Countdown/Put/mtl
3844time 5.500 μs (5.386 μs .. 5.719 μs)
39−variance introduced by outliers: 35% (moderately inflated)
4045
4146benchmarked Countdown/Put/polysemy
4247time 1.903 ms (1.845 ms .. 1.954 ms)
43−variance introduced by outliers: 72% (severely inflated)
4448
4549benchmarked Countdown/Put/freer-simple
4650time 1.324 ms (1.282 ms .. 1.361 ms)
@@ -97,5 +101,5 @@ time 1.478 ms (1.443 ms .. 1.515 ms)
97101```
98102
99103# Future work
100−
101−I am going to make this emit pretty graphs, or at least graphable .csv files, someday.
104+* More benchmarks: `Writer`, logging, `grammar`, `pipes`
105+* I am going to make this emit pretty graphs, or at least graphable .csv files, someday.