4.9. Alternative Ruby Implementations

When we talk about Ruby it's common to assume that we are referring to the latest stable version of Matz's interpreter. It is important to keep in mind that Ruby is a programming language, not a single implementation. Several alternative implementations have popped up over the past few years, thanks to the incredible success that Rails brought to the language. Most of them were aimed toward fixing Ruby's main Achilles' heel, the speed of its most commonly used interpreter. But the world of alternative implementations is so much more than that, and each of them is characterized by particular strengths and weaknesses. Every year new implementations are released and thus there is a form of natural selection in place, which will end up whittling the selection down to a few established players that will become somewhat commonly used. In their wake, many others will fall to the wayside and end up being used far less routinely. The following list introduces you to the ones that are today's main players:

I periodically run shootouts among all these implementations. You can find them on my blog at http://antoniocangiano.com.

  • Ruby 1.9 is the next version of Ruby. In this version, the heart of Ruby has been replaced with a bytecode interpreter known as YARV (Yet Another Ruby VM). It has support for Rails and it's about three times faster than Ruby 1.8.6, according to a series of micro-benchmarks that I run periodically. Unfortunately other benchmarks ...

Get Ruby on Rails® for Microsoft Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.