improve performance for single-effect uses
MTLs 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
UnionandEffdata families with special cases for single-effect and pure computations respectively. this would allow us to then usenewtypes for these special cases as well asUNPACKfor 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.