
Permalink for comment
Virtual machine does not mean slower
by Kasper on Thu 8th Jan 2004 20:02 UTC

The author states that he is surprised that java performs better than compiled code.... This really shouldn't be a surprise. The Java virtual machine compiles its code just like a c++ compiler. There is just one big difference. The c++ compiler compiles its code before it is run, and Java while it is being run. In other words, Java actually knows more about how the code is used, which in theory should let it reach better performance than c++. In real life though, its just recently (the last couple of years) that Java has actually approached (and in some cases passed) c++.