As I said, JAVA is compiled. It's not becuase the executable is a bytecode than it gets interpreted. Where did you find your benchmarks ? The few i found doesn't see such a difference, and in some case JAVA is faster the C++. For example, a recent one:Tenaja wrote:Well, sure, sorta...but not really.Shield wrote:Well, C# and Java are compilers and they do a great job about optimizing the binaries.
Although they output bytecode, it's still machine code while the application is running and therefore no penalties,
and even better, "just in time" optimization.
I'd also like to see more compiler features rather than new libraries, though.
Edit: oh, Fred was faster there.
C++ consistently is 3x faster than Java and the .NET crew. (At least in the current benchmarks I was researching last month.)
While I wouldn't anticipate a "cafe basic" to be as fast as C++ (although there is no technical reason it cannot be), I would certainly expect it to be faster than anything that puts out a resemblance of bytecode.
http://blog.cfelde.com/2010/06/c-vs-java-performance/