[Android Software Development] broodplank1337:
MINI CPU INTEGER BENCHMARK​

Article Featured on XDA Portal: http://www.xda-developers.com/android/benchmark-your-cpu-performance-with-mini-cpu-integer-script/

Description

I have made this script today, what It does is performing a small series of integer tests. It uses the "bc" binary that is ported to ARM, to be able to run the benchmark you need to have busybox installed and a rooted phone (or at least ro.secure=0) and of course you need an ADB connection to your phone.

Testing Technique

First sequence is 3x the single thread test:

( busybox echo '2^2^1' | /system/bin/bc )
( busybox echo '2^2^2' | /system/bin/bc )
( busybox echo '2^2^3' | /system/bin/bc )
( busybox echo '2^2^4' | /system/bin/bc )
( busybox echo '2^2^5' | /system/bin/bc )
( busybox echo '2^2^6' | /system/bin/bc )
( busybox echo '2^2^7' | /system/bin/bc )
( busybox echo '2^2^8' | /system/bin/bc )
( busybox echo '2^2^9' | /system/bin/bc )
( busybox echo '2^2^10' | /system/bin/bc )
( busybox echo '2^2^11' | /system/bin/bc )
( busybox echo '2^2^12' | /system/bin/bc )
( busybox echo '2^2^13' | /system/bin/bc )
( busybox echo '2^2^14' | /system/bin/bc )
( busybox echo '2^2^15' | /system/bin/bc )
( busybox echo '2^2^16' | /system/bin/bc )
( busybox echo '2^2^17' | /system/bin/bc )
( busybox echo '2^2^18' | /system/bin/bc )

After that the multi thread test gets ran 3 times.

( busybox echo '2^2^1' | /system/bin/bc ) &
( busybox echo '2^2^2' | /system/bin/bc ) &
( busybox echo '2^2^3' | /system/bin/bc ) &
( busybox echo '2^2^4' | /system/bin/bc ) &
( busybox echo '2^2^5' | /system/bin/bc ) &
( busybox echo '2^2^6' | /system/bin/bc ) &
( busybox echo '2^2^7' | /system/bin/bc ) &
( busybox echo '2^2^8' | /system/bin/bc ) &
( busybox echo '2^2^9' | /system/bin/bc ) &
( busybox echo '2^2^10' | /system/bin/bc ) &
( busybox echo '2^2^11' | /system/bin/bc ) &
( busybox echo '2^2^12' | /system/bin/bc ) &
( busybox echo '2^2^13' | /system/bin/bc ) &
( busybox echo '2^2^14' | /system/bin/bc ) &
( busybox echo '2^2^15' | /system/bin/bc ) &
( busybox echo '2^2^16' | /system/bin/bc ) &
( busybox echo '2^2^17' | /system/bin/bc ) &
( busybox echo '2^2^18' | /system/bin/bc )

From the elapsed time of the tests the average will be calculated and added up to create the final score.

The test results are pretty stable, and will only differ slightly from each other if cpu settings remain unchanged

Instructions for Linux:

git clone https://github.com/broodplank/MiniCPUIntegerBenchmark

cd MiniCPUIntegerBenchmark

./score --install

Usage:

Enter './score' to run bench from PC

Enter 'score' in Terminal Emulator on phone to run from device

Instructions for Windows:

Download https://github.com/broodplank/MiniCPUIntegerBenchmark/archive/master.zip

Unpack in some folder

Run score.bat to install files to device

Usage:

Enter 'score' in Terminal Emulator on phone to run from device

Sample output:

The lower the score the better! less time elapsed on tests means faster

As I only know the score of an S4 (which is around 9.75) or an S3 (which is around 16.86), I cannot make a real good indication of what phones actually do score. Please run the script and share your result so I can update the script to make it actually give a fitting reward message ;)

This test is actually very fast compared to most benchmarks. depending on your phone speed of course ;)