diff --git a/benchmark/bench-result/catch-deep.svg b/benchmark/bench-result/catch-deep.svg index e4da918..55de03e 100644 --- a/benchmark/bench-result/catch-deep.svg +++ b/benchmark/bench-result/catch-deep.svg @@ -1,102 +1,102 @@ -catch.deep.10000.heftia.5+5+0 1.10 ms +catch.deep.10000.heftia.5+5+0 1.24 ms -1.10 ms ± 43 μs - - - - +1.24 ms ± 104 μs + + + + -catch.deep.10000.heftia.5+4+1 2.00 ms +catch.deep.10000.heftia.5+4+1 2.06 ms -2.00 ms ± 47 μs - - - - +2.06 ms ± 115 μs + + + + -catch.deep.10000.heftia.5+3+2 2.96 ms +catch.deep.10000.heftia.5+3+2 3.01 ms -2.96 ms ± 168 μs - - - - +3.01 ms ± 175 μs + + + + -catch.deep.10000.heftia.5+2+3 4.31 ms +catch.deep.10000.heftia.5+2+3 4.42 ms -4.31 ms ± 203 μs - - - - +4.42 ms ± 412 μs + + + + -catch.deep.10000.heftia.5+1+4 5.52 ms +catch.deep.10000.heftia.5+1+4 5.60 ms -5.52 ms ± 374 μs - - - - +5.60 ms ± 291 μs + + + + -catch.deep.10000.heftia.5+0+5 6.80 ms +catch.deep.10000.heftia.5+0+5 6.86 ms -6.80 ms ± 507 μs - - - - +6.86 ms ± 552 μs + + + + catch.deep.10000.polysemy.5+5 -12.3 ms +12.8 ms -12.3 ms ± 737 μs - - - - +12.8 ms ± 1.1 ms + + + + catch.deep.10000.fused.5+5 -26.6 ms +27.2 ms -26.6 ms ± 1.2 ms - - - +27.2 ms ± 580 μs + + + -catch.deep.10000.effectful.5+5 1.31 ms +catch.deep.10000.effectful.5+5 1.55 ms -1.31 ms ± 121 μs - - - - +1.55 ms ± 122 μs + + + + catch.deep.10000.mtl.5+5 -7.73 ms +8.09 ms -7.73 ms ± 581 μs - - - - +8.09 ms ± 706 μs + + + + diff --git a/benchmark/bench-result/catch-shallow.svg b/benchmark/bench-result/catch-shallow.svg index fa7154b..ed87ba8 100644 --- a/benchmark/bench-result/catch-shallow.svg +++ b/benchmark/bench-result/catch-shallow.svg @@ -1,54 +1,54 @@ -catch.shallow.10000.heftia 1.10 ms +catch.shallow.10000.heftia 1.26 ms -1.10 ms ± 87 μs - - - - +1.26 ms ± 103 μs + + + + catch.shallow.10000.polysemy -3.07 ms +3.07 ms -3.07 ms ± 300 μs - - - - +3.07 ms ± 268 μs + + + + catch.shallow.10000.fused -4.38 ms +4.61 ms -4.38 ms ± 409 μs - - - +4.61 ms ± 220 μs + + + -catch.shallow.10000.effectful 1.28 ms +catch.shallow.10000.effectful 1.51 ms -1.28 ms ± 107 μs - - - - +1.51 ms ± 106 μs + + + + -catch.shallow.10000.mtl 355 μs +catch.shallow.10000.mtl 397 μs -355 μs ± 21 μs - - - - +397 μs ± 34 μs + + + + diff --git a/benchmark/bench-result/coroutine-deep.svg b/benchmark/bench-result/coroutine-deep.svg index dd5feca..f93c4a7 100644 --- a/benchmark/bench-result/coroutine-deep.svg +++ b/benchmark/bench-result/coroutine-deep.svg @@ -1,44 +1,44 @@ -coroutine.deep.1000.heftia.5+5 147 μs +coroutine.deep.1000.heftia.5+5 137 μs -147 μs ± 12 μs - - - - +137 μs ± 11 μs + + + + -coroutine.deep.1000.freer.5+5 136 μs +coroutine.deep.1000.freer.5+5 140 μs -136 μs ± 11 μs - - - - +140 μs ± 12 μs + + + + coroutine.deep.1000.eff.5+5 -4.38 ms +4.45 ms -4.38 ms ± 185 μs - - - - +4.45 ms ± 174 μs + + + + coroutine.deep.1000.mp.5+5 -5.36 ms +5.79 ms -5.36 ms ± 415 μs - - - +5.79 ms ± 394 μs + + + diff --git a/benchmark/bench-result/coroutine-shallow.svg b/benchmark/bench-result/coroutine-shallow.svg index e9d8980..2688117 100644 --- a/benchmark/bench-result/coroutine-shallow.svg +++ b/benchmark/bench-result/coroutine-shallow.svg @@ -1,44 +1,44 @@ -coroutine.shallow.1000.heftia 90.7 μs +coroutine.shallow.1000.heftia 92.0 μs -90.7 μs ± 7.0 μs - - - - +92.0 μs ± 7.1 μs + + + + -coroutine.shallow.1000.freer 94.7 μs +coroutine.shallow.1000.freer 102 μs -94.7 μs ± 6.5 μs - - - - +102 μs ± 8.4 μs + + + + coroutine.shallow.1000.eff -4.01 ms +4.01 ms -4.01 ms ± 178 μs - - - - +4.01 ms ± 353 μs + + + + coroutine.shallow.1000.mp -5.24 ms +5.55 ms -5.24 ms ± 412 μs - - - +5.55 ms ± 344 μs + + + diff --git a/benchmark/bench-result/countdown-deep.svg b/benchmark/bench-result/countdown-deep.svg index 308c995..1d3e6bc 100644 --- a/benchmark/bench-result/countdown-deep.svg +++ b/benchmark/bench-result/countdown-deep.svg @@ -1,81 +1,81 @@ -countdown.deep.10000.heftia.5+5 1.67 ms +countdown.deep.10000.heftia.5+5 1.60 ms -1.67 ms ± 89 μs - - - - +1.60 ms ± 95 μs + + + + countdown.deep.10000.freer.5+5 1.28 ms -1.28 ms ± 86 μs - - - - +1.28 ms ± 108 μs + + + + -countdown.deep.10000.polysemy.5+5 4.28 ms +countdown.deep.10000.polysemy.5+5 4.56 ms -4.28 ms ± 404 μs - - - - +4.56 ms ± 365 μs + + + + countdown.deep.10000.fused.5+5 -15.5 ms +17.1 ms -15.5 ms ± 699 μs - - - +17.1 ms ± 1.5 ms + + + -countdown.deep.10000.effectful.5+5 229 μs +countdown.deep.10000.effectful.5+5 261 μs -229 μs ± 21 μs - - - - +261 μs ± 23 μs + + + + -countdown.deep.10000.eff.5+5 543 μs +countdown.deep.10000.eff.5+5 618 μs -543 μs ± 46 μs - - - - +618 μs ± 48 μs + + + + -countdown.deep.10000.ev.5+5 287 μs +countdown.deep.10000.ev.5+5 366 μs -287 μs ± 10 μs - - - - +366 μs ± 4.8 μs + + + + countdown.deep.10000.mtl.5+5 -9.58 ms +10.6 ms -9.58 ms ± 502 μs - - - - +10.6 ms ± 374 μs + + + + diff --git a/benchmark/bench-result/countdown-shallow.svg b/benchmark/bench-result/countdown-shallow.svg index d7b323a..4b65862 100644 --- a/benchmark/bench-result/countdown-shallow.svg +++ b/benchmark/bench-result/countdown-shallow.svg @@ -1,81 +1,84 @@ -countdown.shallow.10000.heftia 491 μs +countdown.shallow.10000.heftia 477 μs -491 μs ± 45 μs - - - - +477 μs ± 46 μs + + + + -countdown.shallow.10000.freer 414 μs +countdown.shallow.10000.freer 427 μs -414 μs ± 23 μs - - - - +427 μs ± 21 μs + + + + countdown.shallow.10000.polyemy -2.55 ms +2.89 ms -2.55 ms ± 189 μs - - - +2.89 ms ± 195 μs + + + countdown.shallow.10000.fused -2.02 ms +2.23 ms -2.02 ms ± 198 μs - - - - +2.23 ms ± 90 μs + + + + -countdown.shallow.10000.effectful 228 μs +countdown.shallow.10000.effectful 260 μs -228 μs ± 9.6 μs - - - - +260 μs ± 21 μs + + + + -countdown.shallow.10000.eff 549 μs +countdown.shallow.10000.eff 617 μs -549 μs ± 44 μs - - - - +617 μs ± 45 μs + + + + -countdown.shallow.10000.ev 259 μs +countdown.shallow.10000.ev 328 μs -259 μs ± 22 μs - - - - +328 μs ± 27 μs + + + + -countdown.shallow.10000.mtl 805 μs + +countdown.shallow.10000.mtl +964 μs + -805 μs ± 78 μs - - - - +964 μs ± 63 μs + + + + diff --git a/benchmark/bench-result/local-deep.svg b/benchmark/bench-result/local-deep.svg index f822683..455cfbd 100644 --- a/benchmark/bench-result/local-deep.svg +++ b/benchmark/bench-result/local-deep.svg @@ -1,105 +1,105 @@ -local.deep.10000.heftia.5+5+0 2.33 ms +local.deep.10000.heftia.5+5+0 2.49 ms -2.33 ms ± 185 μs - - - - +2.49 ms ± 85 μs + + + + local.deep.10000.heftia.5+4+1 -2.92 ms +3.03 ms -2.92 ms ± 175 μs - - - - +3.03 ms ± 223 μs + + + + local.deep.10000.heftia.5+3+2 -3.63 ms +3.96 ms -3.63 ms ± 234 μs - - - - +3.96 ms ± 206 μs + + + + local.deep.10000.heftia.5+2+3 -4.57 ms +4.95 ms -4.57 ms ± 268 μs - - - - +4.95 ms ± 484 μs + + + + local.deep.10000.heftia.5+1+4 -5.18 ms +5.56 ms -5.18 ms ± 317 μs - - - - +5.56 ms ± 546 μs + + + + local.deep.10000.heftia.5+0+5 -6.38 ms +6.65 ms -6.38 ms ± 616 μs - - - - +6.65 ms ± 230 μs + + + + local.deep.10000.polysemy.5+5 -8.30 ms +8.36 ms -8.30 ms ± 618 μs - - - +8.36 ms ± 667 μs + + + local.deep.10000.fused.5+5 -7.51 ms +8.16 ms -7.51 ms ± 411 μs - - - - +8.16 ms ± 680 μs + + + + -local.deep.10000.effectful.5+5 992 μs +local.deep.10000.effectful.5+5 1.02 ms -992 μs ± 96 μs - - - - +1.02 ms ± 56 μs + + + + diff --git a/benchmark/bench-result/local-shallow.svg b/benchmark/bench-result/local-shallow.svg index 7001e36..a02e908 100644 --- a/benchmark/bench-result/local-shallow.svg +++ b/benchmark/bench-result/local-shallow.svg @@ -2,47 +2,47 @@ local.shallow.10000.heftia -2.33 ms +2.42 ms -2.33 ms ± 172 μs - - - - +2.42 ms ± 236 μs + + + + local.shallow.10000.polysemy -4.09 ms +3.97 ms -4.09 ms ± 217 μs - - - +3.97 ms ± 177 μs + + + local.shallow.10000.fused -1.76 ms +1.77 ms -1.76 ms ± 154 μs - - - - +1.77 ms ± 85 μs + + + + -local.shallow.10000.effectful 956 μs +local.shallow.10000.effectful 972 μs -956 μs ± 62 μs - - - - +972 μs ± 63 μs + + + + diff --git a/benchmark/bench-result/nondet-deep.svg b/benchmark/bench-result/nondet-deep.svg index 182b861..2f3a6ed 100644 --- a/benchmark/bench-result/nondet-deep.svg +++ b/benchmark/bench-result/nondet-deep.svg @@ -1,69 +1,69 @@ -nondet.deep.32.heftia.5+5 12.2 ms +nondet.deep.32.heftia.5+5 11.9 ms -12.2 ms ± 902 μs - - - - +11.9 ms ± 432 μs + + + + -nondet.deep.32.freer.5+5 10.1 ms +nondet.deep.32.freer.5+5 9.62 ms -10.1 ms ± 896 μs - - - - +9.62 ms ± 494 μs + + + + -nondet.deep.32.fused.5+5 12.0 ms +nondet.deep.32.fused.5+5 13.1 ms -12.0 ms ± 336 μs - - - - +13.1 ms ± 854 μs + + + + -nondet.deep.32.ev.5+5 2.66 ms +nondet.deep.32.ev.5+5 2.76 ms -2.66 ms ± 218 μs - - - - +2.76 ms ± 221 μs + + + + -nondet.deep.32.mp.5+5 9.53 ms +nondet.deep.32.mp.5+5 10.4 ms -9.53 ms ± 770 μs - - - - +10.4 ms ± 974 μs + + + + nondet.deep.32.eff.5+5 -69.2 ms +71.4 ms -69.2 ms ± 5.8 ms - - - +71.4 ms ± 3.6 ms + + + -nondet.deep.32.mtl-logict.5+5 8.06 ms +nondet.deep.32.mtl-logict.5+5 8.62 ms -8.06 ms ± 379 μs - - - - +8.62 ms ± 609 μs + + + + diff --git a/benchmark/bench-result/nondet-shallow.svg b/benchmark/bench-result/nondet-shallow.svg index 180571b..e2ff7a9 100644 --- a/benchmark/bench-result/nondet-shallow.svg +++ b/benchmark/bench-result/nondet-shallow.svg @@ -1,69 +1,69 @@ -nondet.shallow.32.heftia 6.70 ms +nondet.shallow.32.heftia 7.22 ms -6.70 ms ± 386 μs - - - - +7.22 ms ± 354 μs + + + + -nondet.shallow.32.freer 5.51 ms +nondet.shallow.32.freer 5.85 ms -5.51 ms ± 323 μs - - - - +5.85 ms ± 505 μs + + + + -nondet.shallow.32.fused 1.32 ms +nondet.shallow.32.fused 1.68 ms -1.32 ms ± 98 μs - - - - +1.68 ms ± 56 μs + + + + -nondet.shallow.32.ev 1.28 ms +nondet.shallow.32.ev 1.42 ms -1.28 ms ± 109 μs - - - - +1.42 ms ± 99 μs + + + + -nondet.shallow.32.mp 3.45 ms +nondet.shallow.32.mp 4.15 ms -3.45 ms ± 228 μs - - - - +4.15 ms ± 245 μs + + + + nondet.shallow.32.eff -34.0 ms +34.4 ms -34.0 ms ± 3.0 ms - - - +34.4 ms ± 2.9 ms + + + -nondet.shallow.32.mtl-logict 1.31 ms +nondet.shallow.32.mtl-logict 1.28 ms -1.31 ms ± 25 μs - - - - +1.28 ms ± 128 μs + + + + diff --git a/benchmark/performance.md b/benchmark/performance.md index 93e13e0..79d059c 100644 --- a/benchmark/performance.md +++ b/benchmark/performance.md @@ -28,12 +28,12 @@ Larger values indicate that `heftia` is faster. | Benchmark | Speedup | | --------------------- | ------------- | -| state, shallow | 1.64x | -| state, deep | 5.74x | -| throw/catch, shallow | 0.32x | -| throw/catch, deep | 1.14 - 6.96x | -| nondet, shallow | 0.20x | -| nondet, deep | 0.66x | +| state, shallow | 2.0x | +| state, deep | 6.6x | +| throw/catch, shallow | 0.3x | +| throw/catch, deep | 1.2 - 6.5x | +| nondet, shallow | 0.2x | +| nondet, deep | 0.7x | ## Reproduction The benchmark code is available at [heftia-effects/bench](https://github.com/sayo-hs/heftia/blob/v0.5.0/heftia-effects/bench).