On Sunday 13 November 2005 01:34, Randall R Schulz wrote:
I'd think you'd not be given to folklore about program efficiency. Static compilation to native code as gcj (or conventional C++) does it is _not_ the best way to optimize performance. Java's so-called JIT (it's really on-demand) native code compilation has optimization opportunities not available when only static program analysis is possible.
Well, gcc has more to offer than just static compilation, although the new stuff isn't really ready yet. But the profiling that you can do in later versions of gcc has a lot of the same characteristics as JIT I do know that a lot of the comments about java efficiency are exaggerated, but it does still have overhead when you run it in the JVM
For all practial purposes and for a sizeable majority of programs, Java is every bit as fast as C++ and what's more, the opportunities for optimization of C++ are more played-out than are those for Java, which is still improving its performance characteristics.
Well, that's a little backwards, since if it's possible to do in a java system it's certainly possible to do for C/C++, and you'd still have the overhead of the JVM I just think the gcj option to compile a native executable is pretty cool