[Vm-dev] Interesting article on PyPy (P{ython's tracing JIT) by Laurence Tratt

Eliot Miranda eliot.miranda at gmail.com
Thu Feb 9 17:05:48 UTC 2012


On Thu, Feb 9, 2012 at 8:32 AM, Lawson English <lenglish5 at cox.net> wrote:

>
>  On 2/8/12 5:41 PM, Eliot Miranda wrote:
>
>
>
> this is well written, relatively short, and extremely informative.
>
>
> http://tratt.net/laurie/tech_articles/articles/fast_enough_vms_in_fast_enough_time
>
>  thanks to Bob  Westergaard for pointing it out to me.
> --
>
>
> Eliot, do you have plans to recreate the functionality of RPython to
> auto-generate JITs for other languages?
>

No.  This article confirmed David Simmons' conclusions as to the potential
performance of tracing JITs, i.e. that they produce excellent performance
for micro-benchmarks but overall perform poorly.  Here are some key quotes:

"It's clear that, in general, an RPython VM won't reach the performance of
something like HotSpot, which has several advantages: the overall better
performance of method-based JITs; the fact that it's hand-coded for one
specific class of languages; and the sheer amount of effort put into it.
But I'd certainly expect RPython VMs to get to comfortably within an order
of magnitude performance levels as HotSpot. Time will tell, and as people
write RPython VMs for languages like Java, we'll have better points of
comparison."

"Tracing JITs are relatively new and have some limitations, at least based
on what we currently know. Mozilla, for example, removed their tracing
JIT<http://blog.mozilla.com/nnethercote/2011/11/23/memshrink-progress-report-week-23/>
a
few months back, because while it's sometimes blazingly fast, it's
sometimes rather
slow<http://blog.mozilla.com/nnethercote/2011/05/31/you-lose-more-when-slow-than-you-gain-when-fast/>.
This is due to a tracing JIT optimising a single code-path at a time: if a
guard fails, execution falls back to the (very slow) tracing interpreter
for the remainder of that bytecode (which could be quite long), and then
back to the language interpreter for subsequent bytecodes. Code which tends
to take the same path time after time benefits hugely from tracing; code
which tends to branch unpredictably can take considerable time to derive
noticeable benefits from the JIT."

My own preferred direction remains to add adaptive optimization to Cog,
after improving the object representation.

>
> L.
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120209/bb035570/attachment.htm


More information about the Vm-dev mailing list