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

classic Classic list List threaded Threaded
1 message Options
Stéphane Ducasse Stéphane Ducasse
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

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



Begin forwarded message:

From: Eliot Miranda <[hidden email]>
Subject: Re: [Vm-dev] Interesting article on PyPy (P{ython's tracing JIT) by Laurence Tratt
Date: February 9, 2012 6:05:48 PM GMT+01:00
To: [hidden email], Squeak Virtual Machine Development Discussion <[hidden email]>
Reply-To: Squeak Virtual Machine Development Discussion <[hidden email]>



On Thu, Feb 9, 2012 at 8:32 AM, Lawson English <[hidden email]> 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 a few months back, because while it's sometimes blazingly fast, it's sometimes rather slow. 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


Loading...