Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

TinyRB: A Young, Tiny Ruby VM for Us to Play With

By Peter Cooper / February 13, 2009

tinyrb.jpg Marc-André Cournoyer has proven that almost anything is possible by developing a small, functional, and surprisingly "unslow" Ruby VM called TinyRB. Some basic testing shows that it's faster than 1.8 on a Fibonacci benchmark, though slightly slower than JRuby, Rubinius, and YARV (Ruby 1.9).

Coming in at just 1541 lines of code so far, TinyRB is not going to be replacing your usual Ruby interpreter anytime soon. While it supports most of the keywords and some base classes including Class, Object, Fixnum, Symbol, and String, there's no support for Array, Module, Float, and a whole ton of essential stuff.

TinyRB, in its current state, is a playground for you to mess around in. In his last keynote at RubyConf 2008, Dave Thomas suggested we "fork Ruby" in many different ways, and TinyRB enables you to do that on a small scale. So newbies.. move on - but if the thought of experimenting and playing with a Ruby VM is something that gets you putting in a major Red Bull and pizza order.. dive in.

In other fringe implementation news, Brian Ford talks about how some new tweaks have increased Rubinius' performance four-fold two-fold.

Comments

  1. macournoyer says:

    yay! thx for the post Peter.

    I just want to add that I plan to add support for some of those shiny essentials, specially the ones named here, maybe not Regexp, too much trouble... We'll see

  2. pjm says:

    Err, you might want to check out Brian's retraction of the 4x claims:

    http://blog.brightredglow.com/2009/2/12/this-is-not-cold-fusion

    Drats...

  3. Peter Cooper says:

    First off, thanks pjm ;-)

    Secondly.. THAT'S IT!! No more posts about speed increases! Every damn time I've posted something benchmark related in the last year, it's always been retracted or changed. My conclusion.. either no-one knows how to benchmark properly or statistics is a nightmare subject. I'll be steering clear ;-)

  4. cbmeeks says:

    @macournoyer

    I was having trouble getting webrick to run Rails 2.3. It would run, but it would take 40 seconds per request! Even for simple "Hello world" templates.

    So I installed Thin and now start my server like:
    ./script/server thin

    BAM! Instant rendering.

    Great job!

  5. Sebastian says:

    @Peter: maybe you can benchmark how fast people retract based on which VM they're running? :P

  6. Gregory Brown says:

    @Peter, I'm think both statements are true :)

  7. hasham2 says:

    I think this could be great for limited memory devices like cell phones etc

  8. Игнат says:

    Действительно, на самом деле все очень просто :)

Other Posts to Enjoy

Twitter Mentions