You must be careful what you compare. Besides the fact that βit depends on what you do with it,β which others have talked about, it also depends on how you do it.
For example, a language like Scala might allow you to naturally express idioms and algorithms that you are likely to take a lot more in Java. This does not mean that you could not compare with the performance of Scala when doing the same thing - just to make it an ugly workaround in one language, to fit the natural idioms in another (note, I do not say that I really believe Scala faster than Java in something specific - I have no data about it - besides this Scala is designed with scalability in mind - hence the name).
In other words, performance is usually associated with algorithms, and often the choice of algorithms is associated with ease of expression. So here we use "using the right tools for the job" - is this tool Java, Scala, JRuby, etc. (Although I doubt that there are situations when a dynamic language is faster than a static language without being pathological).
Of course, we could also talk about profiling before optimization, etc., but this does not directly concern the issue.
philsquared
source share