Frank DENIS random thoughts.

MacRuby, soon based upon the LLVM infrastructure

Apple’s MacRuby is a version of Ruby 1.9, ported to run directly on top of Mac OS X core technologies such as the Objective-C common runtime and garbage collector, and the CoreFoundation framework.

MacRuby is already a very cool and fast Ruby implementation, but it looks like Apple wants to take it a bit further: “It’s now time to focus on the next release, 0.5, which will be principally dedicated to performance. A new virtual machine based on the LLVM compiler infrastructure has been developed and integrated as a replacement for YARV.

The new VM transforms the abstract source tree (AST) directly from the parser into LLVM’s intermediate representation (IR), which is then compiled into optimized machine code. A number of other key optimizations have also been completed, such as fast fixnum arithmetic, cached method dispatch, zero-cost IA64 exceptions, fast instance variable access, constants caching, fast break/next, cheap local variables, tail call optimization and much more.

While the amount of work remaining is significant, the compiler is already able to compile most of the Ruby syntax and the new runtime is mostly complete. Early performance measurements are also very promising, with substantial room for improvement remaining.”

Wow.