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.
-
About me
My name is Kai Jäger and I'm a web application developer working for a web agency in Germany.
Read more -
Ajax in der Praxis
My book on Ajax. Available online and from your local bookstore - provided that you live in Germany.
-
Tags
-
Articles
- 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
-
Websites and blogs
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.