Sunday 7 June 2009

Android Native Code Benchmarks

I have setup some basic tests to compare the runtime of algorithms on
Dalvik Vs those run Natively on a G1.

The tests can be found here;

http://code.google.com/p/android-benchmarks/

Go to 'source' and checkout with SVN.

There are a bunch of links at the bottom of this page for those that
are interested in trying JNI;

http://www.android-internals.org/index.php?title=Main_Page

Although officially it's not supported there is an NDK planned for the
near future (End of 2009);

http://groups.google.com/group/android-ndk

My preliminary results show that quick sort is vastly slower than
native code on the G1 whereas the Sun JVM versus native code (gcc -O2)
are essentially the same on a desktop.

I'm not saying it's groundbreaking info but it's nice to have some
hard statistics. You'll have to change the output log file names to
run this and have the Code Sourcery compiler installed.

I hope to stick some graphs up soon!

Cheers,

Gav

No comments:

Post a Comment