»
Quick Links
Page 1 of 1
Native code Efficiency improvement with DS-5 How to compile the c code with Ds-5 to use with android for efficeincy
#1
Posted 30 December 2011 - 07:09 PM
Dear all,
I am trying to use DS-5 CE for android development, as i have heard that "if i use this code will be 4 times faster than java code". I am having slight doubt on this part.
As i am developing a audio signal processing application, complete module is programmed in c language, now i want to use the same in android with the help of jni, i compiled the code using ndk-build command of android NDK, but the execution time of this is too much on a android device(HCL X1 tablet which is having 1GHZ processor), as it is taking almost 3ms to process 10ms of audio data, this causes much problem as concern to the battery drain as well cpu usage. So iam having doubt that instead of using andoid ndk for compilation of c code if i use this DS-5, can I expect reduction in execution time? If so how can i use DS-5 for compilation of c code and creation of .so file(library) to use with android platform.
As I went thru the help documentation of the Ds-5, every where debugging of the natuve code is explained well but for compilation/building purpose still ndk-build command is used, if that is the case, how using of DS-5 improves the efficiency of the native code?
Please Help with your valuable suggestions
Thanks in adavance
Regards,
Vinod
I am trying to use DS-5 CE for android development, as i have heard that "if i use this code will be 4 times faster than java code". I am having slight doubt on this part.
As i am developing a audio signal processing application, complete module is programmed in c language, now i want to use the same in android with the help of jni, i compiled the code using ndk-build command of android NDK, but the execution time of this is too much on a android device(HCL X1 tablet which is having 1GHZ processor), as it is taking almost 3ms to process 10ms of audio data, this causes much problem as concern to the battery drain as well cpu usage. So iam having doubt that instead of using andoid ndk for compilation of c code if i use this DS-5, can I expect reduction in execution time? If so how can i use DS-5 for compilation of c code and creation of .so file(library) to use with android platform.
As I went thru the help documentation of the Ds-5, every where debugging of the natuve code is explained well but for compilation/building purpose still ndk-build command is used, if that is the case, how using of DS-5 improves the efficiency of the native code?
Please Help with your valuable suggestions
Thanks in adavance
Regards,
Vinod
#2
Posted 31 December 2011 - 11:28 AM
Hmm, I believe the community edition of DS-5 for Android uses the same GCC compiler, so the end result should be the same. Check what compile time options you are feeding the compiler for optimization level, etc.
I've never tried using ARM's own compiler on Android, but I suppose it could be feasible - it talks the same binary interface as the GCC compiler for the most part.
What you can do with DS-5 is profile where you application is spending time, and then focus optimization of the code on those parts.
I've never tried using ARM's own compiler on Android, but I suppose it could be feasible - it talks the same binary interface as the GCC compiler for the most part.
What you can do with DS-5 is profile where you application is spending time, and then focus optimization of the code on those parts.
When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
Share this topic:
Page 1 of 1














