[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Experimental JIT for Guile (???!)

From: Ludovic Courtès
Subject: Re: Experimental JIT for Guile (???!)
Date: Tue, 04 Oct 2016 14:52:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


Lluís Vilanova <address@hidden> skribis:

> Ludovic Courtès writes:
>> Hello!
>> Lluís Vilanova <address@hidden> 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

Disclaimer: I haven’t worked on this and Atsuro would know the answer
better.  :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]