Slashdot Log In
Ruby Implementation Shootout
Posted by
ScuttleMonkey
on Mon Feb 19, 2007 01:04 PM
from the always-with-the-shooting dept.
from the always-with-the-shooting dept.
An anonymous reader writes "Ruby has an ever growing number of alternative implementations, and many of these attempt to improve the suboptimal performance of the current mainstream interpreter. Antonio Cangiano has an interesting article in which he benchmarks a few of the most popular Ruby implementations, including Yarv (the heart of Ruby 2.0), JRuby, Ruby.NET, Rubinius and Cardinal (Ruby on Parrot). Numerical evidence is provided rather than shear opinions. The tests show that Yarv is the fastest implementation and that it offers a promising future when it comes to the speed of the next Ruby version."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

Read the disclaimer... (Score:3, Insightful)
(http://tc.dk/ | Last Journal: Friday August 27 2004, @01:57AM)
Cardinal interesting (Score:4, Interesting)
(http://telebody.com | Last Journal: Tuesday July 30 2002, @07:28AM)
I can't tell if those fast tests are so trivial that they offer little chance of further speedup, or whether YARV, which has had speed as a goal, is not going to be so much faster than a Parrot-based implementation once it (Cardinal) gets into working on optimization.
Anyone interested in providing some information on where the YARV performance comes from and whether Cardinal is likely to approach it more closely and farther across the board in the tests?
cool (Score:1)
(http://blog.woodysroom.com/)
A shear opinion... (Score:2, Funny)
Try "sheer".
Java not slow enough for you? Try Ruby! (Score:4, Insightful)
Any YARV experts (Score:3, Insightful)
Re:Any YARV experts (Score:4, Informative)
(http://slashdot.org/)
Slightly less short answer: if I'm not mistaken, YARV includes a JIT compiler, similar to what Psyco [sourceforge.net] does in the Python world. Psyco has been known to accelerate code execution up to 100x times, so I'd expect YARV to be even faster than this benchmark shows when it's stabilized.
Re:Any YARV experts (Score:5, Insightful)
This rule isn't exactly hard and fast, as verying implementations of VMs and interpreters can have different performance characteristics. For example, while perl is still probably considered an interpreted language, it's quite fast due to the interpreter using many compiler tricks such as parse tree optimizations. The ruby interpreter however has been notoriously slow, which is why ruby people are so excited about it.
unicode? (Score:3, Interesting)
(http://www.lightandmatter.com/)
Feature comparison? (Score:2)
(http://www.hwacha.net/)
I don't think anyone decides to use Ruby based on performance, really. I'd be a lot more interested to hear whether any new features (notably, proper Unicode strings and native threads) are included in any of these implementations -- I really can't use Ruby without at least the former. I would have thought the Java and
I'd also be interested in standardization -- currently IIRC Ruby is specified as 'whatever Matz's implementation is observed to do, that's Ruby'.
Good news on Yarv speed improvements (Score:2)
(http://www.markwatson.com/)
I would have prefered Ruby, BTW, because it is easy to train people in Ruby development while Common Lisp is a harder learning curve.
Once Yarv is very stable (maybe it is already?), then I will use Ruby for a larger percent of my new projects.
Ruby's Windows support (Score:1)
(http://trimbo.blogspot.com/)
Granted, Ruby is mostly used with Rails right now, but you'd think that if the language proponents want the language to take off, Windows support would be taken more seriously. In the couple years since I first tried Ruby, it doesn't seem like it has improved much at all.
Why not use C (Score:4, Funny)
Re:so... ruby? (Score:1, Informative)
Re:so... ruby? (Score:2)
(Last Journal: Wednesday August 09 2006, @06:22PM)
hmmm...Could it be the object-oriented programming language Ruby?
Ruby [wikipedia.org]
Re:so... ruby? (Score:5, Informative)
(Last Journal: Wednesday February 14 2007, @09:49AM)
I was on the same boat until a couple of weeks ago ... anyway, Ruby is The Hottest Thing Since Sliced Bread (TM). It's a programming language that was created in Japan all the way back in 1995. However, it has only just recently garnered mainstream interest due to the emergence of a web application framework built on Ruby, which is called Ruby on Rails and is said to be an incredibly well-thought and efficient framework.
More on Ruby here [wikipedia.org].
And more on Ruby on Rails here [wikipedia.org].
I personally have an enormous interest in Ruby on Rails, as it seems to be a very neat way of writing web applications, but I'm also a bit daunted; it's a new language and a whole new framework with different ways of doing things, so it's been slow going learning it. I just wish I knew where to get some extensive sample code to peruse - that's how I learn best. All I've seen are some very basic applications which don't really teach you the real tricks and show how it all comes together.
Re:so... ruby? (Score:5, Informative)
Yes, Ruby is the current web development flavor of the month, however, don't get caught up in the hype. There are good number of MVC web development frameworks in other languages, including even Lisp and Smalltalk, but most notably Python. In my opinion it makes more sense to learn a Python framework for a number of reasons. Mainly because Python is used in considerably more non-web applications than Ruby, which makes your skills more portable (and you more employable). Ruby on Rails is also very monolythic, while two of the the three most popular Python frameworks, TurboGears [turbogears.org] and Pylons [pylonshq.com] are very modular (especially Pylons since it's built around the WSGI [wsgi.org] spec). Finally, Python compiles to bytecode whereas Ruby does not. Hence Python outperforms Ruby in almost every shootout [debian.org].
Further reading:
Of snakes and rubies; Or why I chose Python over Ruby [infogami.com]
TurboGears and Pylons (a technical comparison) [ianbicking.org]
From PHP to Python [rightbrainnetworks.com] (my blog)
Re:so... ruby? (Score:4, Insightful)
I find it amusing someone would say learn Python because it's used more. Python may be older, but it's still sitting in the programming language high chair right next to Ruby. People say the same thing about Python; "if you want a job learn Java, c#, c++"; and you know what they're right, if you want a job learn Java, period.
I like both Ruby and Python, and I think a programmer would do well to learn one or both. They aren't as popular yet, like Java or c#, but I think they will be. And if you understand the concepts in one, you'll understand the other. Like Gretzky said, "I skate where the puck is going to be, not where it is"; good advice.
I prefer Ruby, but that is just a preference.
Re:so... ruby? (Score:4, Funny)
(http://www.justiceforchandra.com/)
Numerical evidence is provided rather than shear opinions.
Do those opinions come from sheeple?
Strings as objects (Score:4, Interesting)
(http://www.dcc.vu/)
Well, you can also do it in Java .....
String a = "Hello".toLowerCase().toUpperCase();
.... but I'm not sure it makes a huge difference in real software development. I do however like it as the safe test for an exact match without worrying about null ....
if ("FOO".equals(a)) {
Re:so... ruby? (Score:1)
Re:so... ruby? (Score:5, Informative)
(http://phrogz.net/)
Re:so... ruby? (Score:1, Insightful)
"Shear" opinions (Score:1, Funny)
Numerical evidence is provided rather than shear opinions.
Would that be what the author thinks about scissors? For the semi-literate that should be "sheer opinion," not "shear opinions."