From: Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
To: Helmut Brandl <helmut.brandl@gmx.net>, caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Performance penalty for using monad
Date: Tue, 19 Sep 2017 13:24:08 +0000 [thread overview]
Message-ID: <CAGrdgiUapCKa1WPfkBWs=Oh4qi9Zxxk=hhYP2ZF6sfvH2QCxzg@mail.gmail.com> (raw)
In-Reply-To: <690A132C-892E-45DC-A884-415E92054AC4@gmx.net>
[-- Attachment #1: Type: text/plain, Size: 2036 bytes --]
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 <helmut.brandl@gmx.net> wrote:
> Thanks for the hint
>
> Helmut
> > On Sep 18, 2017, at 10:31, Yotam Barnoy <yotambarnoy@gmail.com> 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 <helmut.brandl@gmx.net>
> 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
[-- Attachment #2: Type: text/html, Size: 3526 bytes --]
next prev parent reply other threads:[~2017-09-19 13:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 15:23 Helmut Brandl
2017-09-18 15:31 ` Yotam Barnoy
2017-09-19 12:46 ` Helmut Brandl
2017-09-19 13:24 ` Jesper Louis Andersen [this message]
2017-09-19 16:33 ` Helmut Brandl
2017-09-24 9:22 ` David Allsopp
2017-09-24 11:28 ` Yaron Minsky
2017-09-24 20:04 ` Josh Berdine
2017-09-25 8:32 ` Mark Shinwell
2017-09-25 9:25 ` Josh Berdine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGrdgiUapCKa1WPfkBWs=Oh4qi9Zxxk=hhYP2ZF6sfvH2QCxzg@mail.gmail.com' \
--to=jesper.louis.andersen@gmail.com \
--cc=caml-list@inria.fr \
--cc=helmut.brandl@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).