You are here :
Home
Bench

 

 

 

                  Processing Performance of Iphones and Ipads

          IPhone 4S the most powerful phone ever !:

 

To make a processor benchmark of IOS products i designed a little application called « Bench ». The Bench application performs calculation loops on integer, float and trigonometric functions. It also compute 5000 digits of PI (3.14159....).

The PI computing permits to use the processor core and the channel between the core and the memory in heavy loads.

Iphones and Ipads processor benchmark in a single task program :

 

 

 Iphones and Ipads Processor benchmark in a dual tasks program :

 

 

 The dual tasks benchmark shows a real avantage to the dual core processors. On the Iphone 4S and Ipad 2 there is almost no difference in the time needed to compute in parallel two times 5000 digits of PI, this is not the case for the single core processor that needs twice the time to perform the two tasks.

 

And now how the Iphones compare to the best Android phones on the market ?

 

 

 

 

 

The single task bench on Galaxy SII or HTC Sensation (1.2 Ghz Dual core) on Android gives 1.520 second for the calculation of 5000 digits of PI. This is only 20% better than the Iphone 4G. The relatively poor performance of android system is due to the Java P-code used by the Dalvik "Just In Time" compiler/interpreter. The Iphones and Ipads use the ARM native code, this give a real avantage to the iOS platform. 

The single task bench on a "Core 2 Duo" Mac at 2 Ghz gives 0.175 second.

 

 



 The dual task benchmark shows a real avantage to the dual core processors. On the Iphone 4S and Ipad 2 there is almost no difference in the time needed to compute in parallel two times 5000 digits of PI, this is not the case for the single core processor that needs twice the time to perform the two tasks.

ANDROID benchmark : Dalvik code on Dalvik Virtual Machine versus  Native code

In general, Android applications are written in the Java programming language, from the java program the SDK produce a pseudo-code that will run on a virtual machine called the Dalvik Virtual Machine. Thus a majority of Android applications runs using this "Dalvik" virtual machine, however the development kit enables another programming method using the Native ARM code. The native code gives better performance because it runs directly the processor instructions.

 

 

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

Jit versus NC performance

 

 

 
 

 

 

 

 

 

 

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 :

 

Single core versus dual core perf

 

 

 

 

 

 

 

 

 

 

coding schematic

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.