[IronPython] Tracing JIT for the DLR

Michael Foord fuzzyman at voidspace.org.uk
Sun May 25 21:16:38 CEST 2008


Hello guys,

Just throwing a wild idea out. :-)

PyPy (an interpreter compiler toolchain written in Python) has a tracing 
JIT that is gradually gaining in capabilities.

Similar to the tracing JIT in Tamarin (I believe) it traces types 
through common code paths and generates specialised code for the common 
paths and types. This is a great technique for optimising dynamic 
languages, as although code paths can be taken with different types this 
is fairly rare. If it does happen, dynamic dispatch can still happen.

One interesting consequence of this is that the .NET backend for PyPy 
(interpreters compiled to run on the .NET framework) can still use the 
tracing JIT. Although a PyPy compiled interpreter retains the full 
semantics of the language it implements, it can generate specialised 
.NET bytecode - using the native .NET types, where it provides a faster 
path.

(A very hazy explanation based on my hazy understanding I'm afraid.)

Effectively PyPy compiled interpreters on .NET are double JITTed :-)

I wonder if at some point in the future a similar technique could be 
used to optimise DLR languages.

Michael Foord

-- 
http://www.ironpythoninaction.com/
http://www.theotherdelia.co.uk/
http://www.voidspace.org.uk/
http://www.ironpython.info/




More information about the Ironpython-users mailing list