Java and Hotspots optimize on the fly. C coders optimize better through runtime analysis and knowing meta-information about the code that a compiler can never hope to know.
What do you think hotspot does??? It does runtime analysis. You can even set the compile threshhold...i.e. execute 1000 times before compilation, or wait longer for a better compile.
See this:
".... Also, profile data is collected by the interpreter for guiding the optimizations."
So it DOES do runtime analysis optimization. C code can only be optimized for certain scenarios, whereas hotspot adapts and will de-compile and re-compile as the state of the program changes.
Java and Hotspots optimize on the fly. C coders optimize better through runtime analysis and knowing meta-information about the code that a compiler can never hope to know.
L ive/2005/jl0315.html
What do you think hotspot does??? It does runtime analysis. You can even set the compile threshhold...i.e. execute 1000 times before compilation, or wait longer for a better compile.
See this:
".... Also, profile data is collected by the interpreter for guiding the optimizations."
here:
http://java.sun.com/developer/community/chat/Java
So it DOES do runtime analysis optimization. C code can only be optimized for certain scenarios, whereas hotspot adapts and will de-compile and re-compile as the state of the program changes.
Ahh...your typical uninformed slashdot poster...
p er/Java_Hotspot_v1.4.1/Java_HSpot_WP_v1.4.1_1002_4 .html
r k.html
You do realize that array bounds checking is eliminated by modern VM's? i.e. HotSpot. Suggest you read:
http://java.sun.com/products/hotspot/docs/whitepa
The Java version of Quake performs faster than the C version:
http://www.bytonic.de/html/benchmarks.html
Here are some other benchmarks:
http://www.idiom.com/~zilla/Computer/javaCbenchma
http://kano.net/javabench/
Java VM's such as HotSpot have the ability to de-optimize and re-optimize on the fly. C/C++ can not do that.
Stop repeating the lie that Java is slower than C/C++.