extensible-effects
extensible-effects copied to clipboard
improve performance for single-effect uses
MTL
s State
is very fast and difficult to beat when it comes to single-effect uses. Can this be beaten? Similarly for non-determinism, ContT
is difficult to beat.
moved: benchmark report
potential solution:
use metaprogramming. specifically, make
Union
andEff
data families with special cases for single-effect and pure computations respectively. this would allow us to then usenewtype
s for these special cases as well asUNPACK
for the rest.
would require some effort to test out.
so, we tried using data families for Union
, but didn't see a speedup.
- http://okmij.org/ftp/Haskell/extensible/Eff3.hs
- http://okmij.org/ftp/Haskell/extensible/OpenUnion53.hs
perhaps if we also were able to convert Eff
into a data family we may see results? unclear at present.
There is now fused-effects package, which seems to be quite performant too. I will probably benchmark it against extensible-effects some time later.