[Haskell-cafe] MTL vs Free-monads, what are your experiences

Alberto G. Corona agocorona at gmail.com
Mon Oct 17 15:46:12 UTC 2016


There is a free monad benchmark:

https://rawgit.com/feuerbach/freemonad-benchmark/master/results.html

Not very good for the free monads. But it is done only with a single
transformer and for a single state. I don´t know how the MTL performance
degrades when the transformer stack grows.

2016-10-15 15:49 GMT+02:00 Joachim Breitner <mail at joachim-breitner.de>:

> Hi,
>
> Am Freitag, den 14.10.2016, 17:35 +0200 schrieb Damian Nadales:
> > Do you have
> > any experience using any of these approaches. If so would you mind
> > sharing? ;)
>
> I don’t have an answer to contribute, but I would be very interested in
> hearing about experiences in terms of their relative runtime
> performance.
>
> My gut feeling is that an an indirect function call for every (>>=),
> with many calls to `lift` each time, would make a deep monad
> transformer stack much more expensive. A free monad approach seems to
> be more sensible to me. But maybe GHC is doing a better job optimizing
> this than I would think?
>
> So if you have any number-supported evidence about this, possibly from
> a real-world application where you tried to use one or the other,
> please share it with us!
>
> Thanks,
> Joachim
>
> --
> Joachim “nomeata” Breitner
>   mail at joachim-breitner.dehttps://www.joachim-breitner.de/
>   XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
>   Debian Developer: nomeata at debian.org
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>



-- 
Alberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161017/4b123517/attachment.html>


More information about the Haskell-Cafe mailing list