Just-In-Time Compiler Speeds Up G1
One important feature of the new android 2.2 system (Froyo) is the integration of the JIT, also called just-in-time compiler. JIT compiles the java bytecode into machine code at runtime to improve the execution speed. But can the JIT compiler really boosts the performance of the mobile system, even on the old photo like the G1 ?
I did some tests on my old G1 dev phone, the results are showed here below. For every configuration, I ran CaffeineMark 3 times and took the average value.
Test environment :
- HTC Dream G1
- Cyanogenmod-6.0.0-DS-RC1
- CaffeineMark 3.0
Test results:
| No JIT, Heap 16MB | With JIT, Heap 16MB | With JIT, Heap 24MB |
| Average 615 | Average 1253 | Average 1444 |
Table shows that the JIT compiler can almost double the program’s execution speed and giving more heap memory to vm can slightly increase the performance due to the less GC time. The effect of the JIT compiler to the battery life is unknown from the tests.
Pragma Consult