From: Charles Oliver Nutter Date: 2011-10-26T00:12:47+09:00 Subject: [ruby-core:40357] Re: JIT development for MRI On Tue, Oct 25, 2011 at 9:36 AM, Carter Cheng wrote: > Hello, > I was recently considering some JIT development work on MRI 1.9. internals > after spending sometime looking at the internals of rubinius and macruby. It > would seem that various notions taken from older projects like Craig > Chambers self thesis would make some sense when applied here or some > developments in trace trees (older notions like in Dynamo) or the latest > piece on Ruby in POPL 2011. > Some of these obviously require some adaptation before being applied to MRI. > Any comments would be appreciated. I would love to see MRI get a JIT. Some quick rambling thoughts. * You'll get a good perf boost just by compiling to native code and avoiding the interpreter, but the biggest boost will come from inlining methods. JRuby on Java 5/6 does only the former (or rather, we don't make it possible for the JVM to inline). JRuby on Java 7 does the latter, and performance can be many times faster. * ruby-core folks will be sensitive to any additional dependencies. For example, LLVM is not a small library. Of course the JIT could be made an optional part of the build. * I will happily share techniques we've used to optimize JRuby. We do get to leverage the JVM a lot, but I also have a good working knowledge of how the JVM does JIT and optimization. - Charlie