Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pure c++ app for Android and its performance

Can I write a pure C++ app for Android? (for example, using NDK?)

Considering there's no difference of functionality, is pure Android C++ app faster and consumes lesser memory than Android Java app? In just my guess, I guess it is YES because C++ app won't do garbage collection which causes frame rate hiccup.

like image 420
Hyunjik Bae Avatar asked Jun 11 '12 09:06

Hyunjik Bae


1 Answers

Yes and yes, althrough Google says:

"Using native code does not result in an automatic performance increase, but always increases application complexity... If you write native code, your applications are still packaged into an .apk file and they still run inside of a virtual machine on the device. The fundamental Android application model does not change."

from http://developer.android.com/sdk/ndk/index.html

(Personally, I don't agree that writing in C++ automatically makes a more complex program than Java, I'd even say it's the other way around for a skilled C++ programmer)

like image 112
Viktor Sehr Avatar answered Oct 03 '22 14:10

Viktor Sehr