From: Alain Frisch <alain.frisch@lexifi.com>
To: Yotam Barnoy <yotambarnoy@gmail.com>
Cc: "Frédéric Bour" <frederic.bour@lakaban.net>,
"Gerd Stolpmann" <info@gerd-stolpmann.de>,
"Soegtrop, Michael" <michael.soegtrop@intel.com>,
"Christoph Höger" <christoph.hoeger@tu-berlin.de>,
"caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Closing the performance gap to C
Date: Wed, 21 Dec 2016 17:06:10 +0100 [thread overview]
Message-ID: <45f9251b-c362-ac9f-fa71-07ab42087c90@lexifi.com> (raw)
In-Reply-To: <CAN6ygOkFexwWYHPJuJU5o_f0ctwTDXmb9+guRLnt=0JMxkiMKA@mail.gmail.com>
On 21/12/2016 15:45, Yotam Barnoy wrote:
> I think it's not worth the effort. You need to examine all the code
> dealing with a parameter (ie. its flow) to see if any generic function
> is called on that parameter.
This would be treated a bit like the stubs for optional arguments with a
default value. Any function taking float arguments or returning a float
would be compiled to a specialized version with an unboxed calling
convention plus a stub which implements the generic calling convention
and delegate the call to the specialized version (or copy its body if it
is small enough). On call site, when the called function is known, one
calls the specialized version instead. This is a systematic, local
compilation scheme, similar to other optimizations made in
closure/cmmgen; it does not require a more global analysis nor a
radically different representation of the code.
About the "it's not worth the effort": the effort has largely been done,
since the ticket came with a working patch (some more effort would be
needed to bring it up to date, though). In my opinion, this seems like
a rather low-hanging fruit with very immediate and significant gains.
I'd rather have this soon than wait for flambda to become stable and
usable on large projects.
-- Alain
next prev parent reply other threads:[~2016-12-21 16:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-17 13:01 Christoph Höger
2016-12-17 13:02 ` Christoph Höger
2016-12-19 10:58 ` Soegtrop, Michael
2016-12-19 11:51 ` Gerd Stolpmann
2016-12-19 14:52 ` Soegtrop, Michael
2016-12-19 16:41 ` Gerd Stolpmann
2016-12-19 17:09 ` Frédéric Bour
2016-12-19 17:19 ` Yotam Barnoy
2016-12-21 11:25 ` Alain Frisch
2016-12-21 14:45 ` Yotam Barnoy
2016-12-21 16:06 ` Alain Frisch [this message]
2016-12-21 16:31 ` Gerd Stolpmann
2016-12-21 16:39 ` Yotam Barnoy
2016-12-21 16:47 ` Gabriel Scherer
2016-12-21 16:51 ` Yotam Barnoy
2016-12-21 16:56 ` Mark Shinwell
2016-12-21 17:43 ` Alain Frisch
2016-12-22 8:39 ` Mark Shinwell
2016-12-22 17:23 ` Pierre Chambart
2016-12-21 17:35 ` Alain Frisch
2016-12-19 15:48 ` Ivan Gotovchits
2016-12-19 16:44 ` Yotam Barnoy
2016-12-19 16:59 ` Ivan Gotovchits
2016-12-21 9:08 ` Christoph Höger
2016-12-23 12:18 ` Oleg
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=45f9251b-c362-ac9f-fa71-07ab42087c90@lexifi.com \
--to=alain.frisch@lexifi.com \
--cc=caml-list@inria.fr \
--cc=christoph.hoeger@tu-berlin.de \
--cc=frederic.bour@lakaban.net \
--cc=info@gerd-stolpmann.de \
--cc=michael.soegtrop@intel.com \
--cc=yotambarnoy@gmail.com \
/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