Are you concerned about ruby being slow?

by Frank

This is a real question, I’d like to hear your opinion on this matter.

Ruby is known to be slow, even compared to other interpreted languages like python. It’s sad, but it’s true. Does it bother you? Well, don’t be shy, i’ll answer first : it bothers me. You probably heard of the recent twitter performance issues. Well, it appears that ruby is partly blamed for this. Of course, there are probably some implementation details that could be improved in this application (just speculating here) and Rails itself should also take a good part of the blame (e.g. some ActiveRecord features are known to be costly on the performance side of things). But for now let’s forget about Rails costly features and let’s focus on the programming language behind it.

We cannot hide behind hardware-is-becoming-so-performant-and-cheap-that-it-doesnt-matter kind of excuses anymore. While it’s true that buying better and faster hardware will mask the fact that ruby is inefficient, it seems like we’re just trying to put a plaster on the real problem. Ruby performance shortcomings must be addressed at it’s heart, that is, in the source code of it’s official interpreter.

Could YARV be the saving grace?

What is YARV? YARV is another virtual machine for Ruby like are JRuby, Rubinus and the official interpreter written in C (ruby 1.8). In other words, it’s simply another implementation of the programming language we love. YARV humorously stands for Yet Another Ruby VM. The smart guy behind this project is SASADA Koichi and his goal with YARV is crystal clear. Like he said : The goal of this project is only one, to develop the fastest Virtual Machine for Ruby in the world.

Is it faster than, say, JRuby? I don’t know, but I know what I like the most about it : YARV is expected to get merged into the official implementation of the language. What does it means? It means we would still be able to call ourselves rubyists and not yarvers (phew). Big deal huh? This detail aside, I think it is quite important that the official interpreter stops being qualified as the worst of all. For a lot of people (myself included), the official ruby interpreter IS ruby (we can hardly blame us for wanting to use “the real thing”, can we?). To me, the importance of having an official virtual machine that is efficient is crucial.

Now, I have two questions for you :

  1. Are you concerned about ruby being slow?
  2. Do you have faith in YARV?
Bookmark this post : These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Reddit
  • del.icio.us
  • Digg
  • Furl
  • Technorati
  • StumbleUpon