<i>Don't you want strong typing for better performance?</i>
<i>That's what I thought, too. The VM designers say that in practice, type guarantees really don't help them nearly as much as you might think, because type checks are not a major drain on performance.</i><p>No, but you can generate better code if you know <i>exactly</i> what types you're playing with ahead of time.<p>Say you have a function like this:<p><pre><code> void foo(SomeClass obj) {
obj.bar();
}
</code></pre>
That could be compiled to just a straight 'jmp SomeClass::bar', whether you're compiling natively or to a VM.<p>If you don't have static types, the best code you can output is something along the lines of this:<p><pre><code> fn = lookup(obj, "bar")
jmp fn
</code></pre>
Of course there are tricks that you can use to optimize this second case a bit that involve fancy static analysis, fancy JIT business, etc. but the point is that you will <i>never</i> generate better code than just a single jump to the right code, based on the types you know at compile time in a static language.