extensible-effects icon indicating copy to clipboard operation
extensible-effects copied to clipboard

improve performance for single-effect uses

Open suhailshergill opened this issue 6 years ago • 4 comments

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.

suhailshergill avatar Apr 20 '18 05:04 suhailshergill

moved: benchmark report

samuelpilz avatar May 07 '18 04:05 samuelpilz

potential solution:

use metaprogramming. specifically, make Union and Eff data families with special cases for single-effect and pure computations respectively. this would allow us to then use newtypes for these special cases as well as UNPACK for the rest.

would require some effort to test out.

suhailshergill avatar Jan 28 '19 20:01 suhailshergill

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.

suhailshergill avatar Feb 25 '19 20:02 suhailshergill

There is now fused-effects package, which seems to be quite performant too. I will probably benchmark it against extensible-effects some time later.

greydot avatar Dec 29 '19 21:12 greydot