On Wed, Oct 26, 2011 at 6:43 PM, Carter Cheng <cartercheng / gmail.com> wrote:
> I guess when it comes to Ruby my sense is that the dynamism poses some
> complex problems for development of a good JIT system. I know that Macruby
> relies on the LLVM JIT system and this simplifies much of the coding.-
> however the LLVM JIT system is rather heavyweight. There was some paper
> describing for example the effect of substituting (not in much detail) tcg
> in QEMU using the LLVM system and the performance was significantly impeded.

You may find more interesting practical (rather than
academic/theoretical) JIT work by looking at what mainstream JVMs do
(and by extension, how JRuby gets much of its performance) and what
Rubinius does (code generation using LLVM, but using runtime profiling
to perform method inlining...much like the JVM). MacRuby is a great
piece of work, but as far as I know it does not do any runtime
optimization; the use of LLVM is just for direct translation to native
code, which as I mentioned previously only gets you a modest
performance boost.

- Charlie