Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, the internet topic exchange).


Is Ruby performance that terrible?

It seems that everyone is getting mad about Joel Spolsky saying Ruby is slow. The most recent thing Joel has suggested is that Ruby is slow because its nature results in lots of vtable lookups. Pretty much every other scripting language does the same thing, though, so Ruby should be able to be at least as fast as Python.

Interesting to see some real numbers on the Computer Language Shootout page. Python's usually quite a way down in the list, but the performance of the Ruby versions for each benchmark seems even worse -- so it looks like it's not just the nature of the language; Ruby's interpreter needs a fair bit of optimization too.

Either that, or Ruby hackers haven't spent much time optimizing the Ruby benchmarks on the site. That would be a worthwhile use of time for anyone in that camp who wants to make their language of choice appear a bit better to the world!

I remember Perl hackers complaining about Python performance some time back. They seem to be neck and neck if you look at the comparison between Perl and Python benchmarks here, though.

The same comparison, but for Python vs Ruby, tells a different story - Ruby is only faster for the 'startup' benchmark. It uses less memory for a significant number, though...