Pretty much by accident I just discovered this video on YouTube, in which James Gosling, inventor of the Java programming language, basically badmouthes Ruby and it's lack of scalability. Twitter (which is written in Ruby) has had some issues, so he might have a point there. But what struck me was the following sentence: "dynamic typing in terms of raw execution performance costs you between one and two orders of magnitude in performance". I usually try not to disagree with people who are between one and two orders of magnitude smarter than me, but in this case I have to.
When Java came out in 1995, it didn't have the high-performance VM it has now. In fact, it was strictly bytecode-interpreted and it had a non-generational garbage collector that would freeze the application whenever a collection was taking place. Java was pretty slow in the beginning and it was often made fun of for that reason. In fact, even today many (ignorant) people associate Java with unresponsive applications. Ultimately, Sun realized that the performance wasn't good enough and so they bought the company that originally developed the Hotspot VM. The funny thing is that many of the concepts that make the Hotspot VM so great were actually inspired by technologies that were originally developed for dynamic languages such as Self (which now is conveniently developed at Sun) and Smalltalk.
Dynamic typing is in fact associated with a performance penalty, but most of this penalty can be overcome by using things like compile-time type-inference and tracing JIT compilers. James Gosling of all people should know that runtime performance isn't a black-and-white thing. A few years ago everybody thought virtual function calls were "several orders of magnitude" slower than static function calls. Now we have tracing JIT-compilers that can inline these calls. To me, it seems like the formerly bullied now becomes a bully himself (just like in real life). Or in other words: shit rolls downhill.
Kai.Jaeger.Blog
-
About me
This is the personal weblog of Kai Jäger, a twentysomething technical project manager from Germany. -
Ajax in der Praxis
My book on Ajax. Available online and from your local bookstore - provided that you live in Germany.
-
Tags
-
Articles
- JavaScript for people who are in slightly less of a hurry - part one
- JavaScript for people who are in a hurry
- Some advice on how to give a presentation that doesn't suck – part three
- Some advice on how to give a presentation that doesn't suck – part two
- Some advice on how to give a presentation that doesn't suck – part one
- The Monte Carlo method for cross-browser CSS
- Introducing BISON - Binary Interchange Standard and Object Notation
- The singleton design pattern in JavaScript
- More articles
-
Archive
- October 2009 [2]
- July 2009 [1]
- June 2009 [3]
- May 2009 [1]
- February 2009 [1]
- January 2009 [1]
- December 2008 [1]
- November 2008 [3]
- October 2008 [2]
- September 2008 [2]
- August 2008 [1]
- July 2008 [6]
- June 2008 [1]
- May 2008 [1]
- April 2008 [3]
- February 2008 [2]
- January 2008 [1]
- December 2007 [1]
- November 2007 [1]
- May 2007 [1]
- February 2007 [7]
- January 2007 [1]
- December 2006 [6]
-
Websites and blogs
Back to top
©2009 Kai Jäger. All rights reserved. Click here to email me or read the
legal notice.
Comments
Write a new comment | Trackback URI for this entryI really like to follow "Headius" (Charles Nutter in real life) and his advances in ruby on the JVM. Really looking forward to be able to include native C code extentions (e.g. for Database drivers) in jruby. Once this is working 100% you can really start deploying ruby code on a java app server. Today it's already possible for your basic rails app, but not every plugin works because of the limitations of external C code includes
Blog: http://headius.blogspot.com/
Twitter: http://twitter.com/headius
Write a new comment
<strong>,<em>,<cite>and<code>. Links, email addresses and line breaks are parsed automatically.