http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html
中:
java和C++在以下方面打成平手(精确到小数点后一位,完全相同)
Integer division
Dead code
Dead code with Integer division
Floating-point division
Static method
Member method
Virtual member method
但java在以下方面的速度是C++的约3倍
Virtual member method with down cast and Run-Time Type Identification (RTTI)
The Java is Faster than C++ and C++ Sucks Unbiased Benchmark
http://kano.net/javabench/
Java与C++性能对比:
http://www.philippsen.com/JGI2001/finalpapers/18500097.pdf
Java pulling ahead? Performance of Java versus C++
Performance tests show Java as fast as C++
http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html
JIT Optimization techniques :
Dataflow analysis
Elimination of redundant tests
Translation from stack operations into register operations
Code scheduling
Reduction of memory accesses by register allocation
Method inlining
Dead-code elimination
Elimination of common sub-expression
Loop versioning
Versioning of virtual method calls
Constant propagation
http://www.trl.ibm.com/projects/jit/detail_e2.htm
新的JIT理论:
JIT compiler
– Method invocation optimization[OOPSLA00][JVM02]
– Exception optimization[ASPLOS00][OOPSLA01][PACT02]
– Profiling based optimization[JG00][PLDI03][PACT03]
– Float optimization[JVM02][ICS02]
– 64bit architecture optimization[PLDI02]
– Register allocation[PLDI02]
– Data prefetch[PLDI03]
– Instruction Scheduling[CGO03]
– Compiler overview[JG99][IBMSysJournal00][OOPSLA03]
Runtime systems
– Fast lock[OOPSLA99][OOPSLA02][ECOOP04]
– Fast interpreter[ASPLOS02]