One more question: It seems that flambda is necessary in order to optimize monadic code. Is there a plan that flambda will be included in a base release of ocaml? Up to now all base releases like 4.03.0, 4.04.0, etc. do not include flambda. I have to request the extension if I want it. Helmut > On Sep 19, 2017, at 08:24, Jesper Louis Andersen wrote: > > It was some time ago, but I was toying with an encoder/decoder for the "Transit" format (of Clojure/Cognitect fame). That decoder used monads heavily as well, and flambda provided roughly an order of magnitude speedup (and a lower GC pressure as well in addition). It was enough that I made a mental note of using flambda if this ever went into a system with high throughput requirements. > > On Tue, Sep 19, 2017 at 2:47 PM Helmut Brandl > wrote: > Thanks for the hint > > Helmut > > On Sep 18, 2017, at 10:31, Yotam Barnoy > wrote: > > > > You might find this > > (https://discuss.ocaml.org/t/ann-monads-the-missing-monad-transformers-library/830/8 ) > > discussion relevant. > > > > On Mon, Sep 18, 2017 at 11:23 AM, Helmut Brandl > wrote: > >> I want to restructure my project using monads (reader, state, option, etc.) in order to get cleaner code. > >> > >> Is there any performance penalty to pay. From my understanding there shouldn’t be any or only very little since aggressive inlining should be able to compile the monads away. > >> > >> Is there any experience on how the optimizing ocaml compiler is able to optimize monadic code? > >> > >> Regards > >> Helmut > >> > >> -- > >> Caml-list mailing list. Subscription management and archives: > >> https://sympa.inria.fr/sympa/arc/caml-list > >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > >> Bug reports: http://caml.inria.fr/bin/caml-bugs > > > > -- > > Caml-list mailing list. Subscription management and archives: > > https://sympa.inria.fr/sympa/arc/caml-list > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > Bug reports: http://caml.inria.fr/bin/caml-bugs > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs