From: ludo@gnu.org (Ludovic Courtès)
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: Andy Wingo <wingo@igalia.com>, Mark H Weaver <mhw@netris.org>,
Atsuro Hoshino <hoshinoatsuro@gmail.com>,
guile-devel@gnu.org
Subject: Re: Experimental JIT for Guile (???!)
Date: Tue, 04 Oct 2016 14:52:16 +0200 [thread overview]
Message-ID: <87eg3w9szj.fsf@gnu.org> (raw)
In-Reply-To: <87mvikzba5.fsf@fimbulvetr.bsc.es> ("Lluís Vilanova"'s message of "Tue, 04 Oct 2016 11:57:54 +0200")
Hello!
Lluís Vilanova <vilanova@ac.upc.edu> skribis:
> Ludovic Courtès writes:
>
>> Hello!
>> Lluís Vilanova <vilanova@ac.upc.edu> skribis:
>
>>> Still, this mail made me think if optimizations based on "tracing" (or any kind
>>> of runtime-based profiling) could be nested. Then you could start by applying
>>> the existing compiler optimizations, later generate a procedure/trace version
>>> dispatcher with unboxed operations (you can add new versions as they become
>>> hot), and only at the end generate native code.
>
>> I’m not sure what you mean by “nested”. What tracing JITs and Nash do
>> is collect execution traces, and trigger native code compilation once a
>> given segment of code (a loop body) has been executed a number of times.
>> The generated code is specialized according to that trace.
>
> By nesting I mean applying different optimizations at different thresholds, but
> all based on tracing the executed code. Aka, the hotter it gets, the more you
> try to optimize it.
>
> Also, is it absolutely necessary to implement the tracing on the VM? Can't it be
> done by adding a new opcode to the VM to compute the statistics? Then you can
> add that opcode to any region of code, like procedure or loop iteration
> prologues. Also, then you can do so from a higher-level language that does have
> the concept of loops, instead of inferring them from jump offsets.
Dunno. I like the hook approach because it’s very simple and
orthogonal. From a Guile maintenance viewpoint, those hooks are
something we can provide at no cost; conversely, providing a special
opcode to gather traces would change a core aspect of Guile (the VM
instruction set) and would be quite a commitment that we’d rather not
make.
Disclaimer: I haven’t worked on this and Atsuro would know the answer
better. :-)
Ludo’.
prev parent reply other threads:[~2016-10-04 12:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 17:30 Experimental JIT for Guile (???!) Christopher Allan Webber
2016-09-28 4:11 ` Nala Ginrut
2016-09-28 7:45 ` Christopher Allan Webber
2016-09-28 12:17 ` Amirouche Boubekki
2016-10-03 20:38 ` Ludovic Courtès
2016-10-03 22:21 ` Lluís Vilanova
2016-10-04 7:58 ` Ludovic Courtès
2016-10-04 9:57 ` Lluís Vilanova
2016-10-04 12:52 ` Ludovic Courtès [this message]
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eg3w9szj.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
--cc=hoshinoatsuro@gmail.com \
--cc=mhw@netris.org \
--cc=nalaginrut@gmail.com \
--cc=wingo@igalia.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).