News for hackers. Stuff that matters.
Re:Why Is C Faster Than Java (2009) by bombcar on Monday December 27, 2021 @12:12AM (#29699506)
Theoretical max performance is different from actual performance - and since all code on a given machine ends up in machine code all languages are the same speed - which is obviously false.
Re:Why Is C Faster Than Java (2009) by silisili on Monday December 27, 2021 @12:25AM (#29699598)
Agreed. I should have added to my initial post that I think language speed comparisons are absolutely stupid for the reasons I mentioned.

I don't go around saying C is faster than Java. I just say Java cannot be faster than C.

Re:Why Is C Faster Than Java (2009) by kovac on Monday December 27, 2021 @02:40AM (#29700371)
But not all languages emit the same machine code. And I think performance is more sensitive to memory access than machine instructions, so I don't think this point is true.
Re:Why Is C Faster Than Java (2009) by bombcar on Monday December 27, 2021 @08:26AM (#29702308)
The point is that a language can be faster than the language it is written in - all or for the most part - depending on how it is used. Saying "the theoretical performance of Java can never be faster than the theoretical performance of C" is a tautology and pretty useless - especially if in practice the Java libraries handle normal operations better than the average C programmer.