@@ -1 +1,101 @@
1# effects-benchmarks
1# effects-benchmarks
3+This 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.
7+On a 15-inch 2017 MacBook Pro (3.1GHz Intel i7, 16GB RAM), here are results for space benchmarks:
17+ extensible-effects 1,304
27+ extensible-effects 984
31+Time (`State`-based countdown):
34+benchmarked Countdown/Put/fused-effects
35+time 5.692 μs (5.570 μs .. 5.835 μs)
37+benchmarked Countdown/Put/mtl
38+time 5.500 μs (5.386 μs .. 5.719 μs)
39+variance introduced by outliers: 35% (moderately inflated)
41+benchmarked Countdown/Put/polysemy
42+time 1.903 ms (1.845 ms .. 1.954 ms)
43+variance introduced by outliers: 72% (severely inflated)
45+benchmarked Countdown/Put/freer-simple
46+time 1.324 ms (1.282 ms .. 1.361 ms)
48+benchmarked Countdown/Put/extensible-effects
49+time 1.383 ms (1.343 ms .. 1.422 ms)
51+benchmarked Countdown/Put/shallow
52+time 275.1 μs (270.1 μs .. 281.6 μs)
55+Time (`State` + `Error` countdown):
58+benchmarked Countdown/Put+Exc/fused-effects
59+time 9.829 μs (9.645 μs .. 10.04 μs)
61+benchmarked Countdown/Put+Exc/mtl
62+time 9.968 μs (9.779 μs .. 10.15 μs)
64+benchmarked Countdown/Put+Exc/polysemy
65+time 418.1 μs (408.9 μs .. 427.1 μs)
67+benchmarked Countdown/Put+Exc/freer-simple
68+time 1.157 ms (1.120 ms .. 1.199 ms)
70+benchmarked Countdown/Put+Exc/extensible-effects
71+time 1.232 ms (1.212 ms .. 1.262 ms)
73+benchmarked Countdown/Put+Exc/shallow
74+time 55.12 μs (54.34 μs .. 56.29 μs)
77+Time (custom HTTP DSL):
80+benchmarked HTTP/fused-effects
81+time 8.311 μs (8.060 μs .. 8.592 μs)
83+benchmarked HTTP/polysemy
84+time 14.99 ms (14.26 ms .. 15.80 ms)
86+benchmarked HTTP/extensible-effects
87+time 1.612 ms (1.578 ms .. 1.654 ms)
89+benchmarked HTTP/Deep embedding
90+time 2.027 ms (1.876 ms .. 2.184 ms)
92+benchmarked HTTP/Shallow embedding
93+time 15.94 μs (15.49 μs .. 16.46 μs)
95+benchmarked HTTP/freer-simple
96+time 1.478 ms (1.443 ms .. 1.515 ms)
101+I am going to make this emit pretty graphs, or at least graphable .csv files, someday.