3 ms·
You can't see a situation where the JVM can optimize things, inline code, etc at runtime and beat a general C implementation? :/
by axod 17y ago
You can't see a situation where the JVM can optimize things, inline code, etc at runtime and beat a general C implementation? :/
- wvenable 17y agoA Java application will invariably use more much memory than C implementation of almost any non-trivial application. You can inline code all you want, but it'll never change that. The JVM isn't magical -- it's not going to solve all your performance problems. When you're allocating a million tiny little objects with all the necessary accounting you can't optimize that away. BTW, if it's so obvious why haven't you still provided at least one non-trivial concrete example of Java faster than C?
- rbanffy 17y agoI would say that any C programmer worth his salt (unlike me) knows how to profile the code under a meaningful workload and how to optimize it to be faster. I remember I used the shortest possible integers and the register keyword in the late 80's far too many times to count. The point of somewhat higher-level languages like Java (I refuse to say Java is a high-level language - it would be one in the late 80s, but not today) is not to make programs run faster, but to make it easier to make them run correctly.