Original post by Anonymous PosterQuote:
Original post by Anonymous Poster
There could be a number of reasons. One could be the codesize, JavaVM bytecode can be smaller compared to compiled C++ code. So there will be a bigger chance for Java bytecode to run out of the processor cache. The same goes for the memory model of Java.
This is a general rule for interpreted code compared to compiled code. In former days the CPU cache was to small, by today this is different.
That has no sense. You will always execute compiled code, thats obvious, bytecode is going to be compiled to native code or interpreted by a native progam, ¿whats the difference?. So bytecode size is not an issue when talking about cache sucess. And please, do not take too seriously all that java vs c++ stuff, usually there is a clear will to alter the benchmark.
Well, it's a matter of statictics, good designed Java programs compared to good designed C++ programs have a bigger chance of getting better cache results. Due to their tighter class structures.
But I surely argee that comparing ordinary "middle-of-road" programs, C++ programs will finish first.
But then.... I remember the time (I am getting old :-( ) when I had the same discussion while defending my assembler programs against those new C programmers...... tja...
Speed isn't everything..... Java programs are much easier to program and to maintain....
But that's my opinion ;-).