The Dalvik VM is a register based machine that has been optimized for mobile application. The VM has been design to enable multiple instances to run at the same time, this improves the overall security and performance. Performance comparison of android versions, the test was carried on the Samsung Galaxy S GT-19000 : 1 Ghz ARM cortex A8 single core CPU : - 2.1 ECLAIR : 3.7 seconds - 2.2 FROYO : 1.6 second Those performance results show the real speed improvement brought by the JIT (Just In Time) compiler added in the Froyo version of Android delivered in may 2010. To get the maximum performance from the CPU, the only way is to use Native ARM code. The performance test between Java + Dalvik code and C code with ARM code was carried on an HTC Sensation Z710E / Pyramid : 1.2 Ghz ARM dual core CPU running the Gingerbread (2.3.3) version of android: Single task Dalvik java code : 1.6 second Single task Native c code : 0.8 second Dual tasks Dalvik java code : 2.2 seconds Dual tasks Native C code : 1 second Performance using JIT and using ARM Native Code  The native code is almost 5 times faster than the Eclair code (2.1 january 2010). Single Core versus Dual Core Dalvik code and Dual Core Native code running a two concurrent processes :   And Now PC or Mac using Intel ships (Atom and Core 2 Duo) , the performance are : 1 thread = 0.175 second (one process computing 5000 digits of PI)2 threads = 0.180 second (two processes each computing 5000 digits of PI)4 threads = 0.360 second The same calculation on PC running Ubuntu 11.04 on an Intel Atom N 550 at 1.5 Ghz gives the following results : 1 thread = 0.665 second 2 threads = 0.7 second 4 threads = 1.0 second
This means than the CPU performance of the Apple A5 is better than the Atom N550 ( (2 physical cores and 4 logical cores) at a clock 50% higher. It should be underlined that the ARM achitecture is very efficient regarding the task concurrency performance. There is almost no difference between a single thread and two threads.
Intel Core 2 Duo P9400 2.4Ghz 1 thread = 0.151 s 2 threads = 0.160 s 4 threads = 0.320 s
ATOM 330 1.6 Ghz (2 physical cores and 4 logical cores) 1 thread = 0,655 s 2 threads = 0.660 s 4 threads = 1.035 s
Celerom 900 Mhz (1 physical core) 1 thread = 0.771 s 2 threads = 1.720 s 4 threads = 3.180 s
The Apple engineers have really done a great job with the hardware to achieve those performance. |