Long math calculations in an Android application

I am an amateur developer, and I am creating an Android application that will perform lengthy math calculations (e.g. for several for-loops). I read on the Android developer website that Renderscript is a possible way to reduce time and memory. However, I don't have a read (or write option in this case) in C, so I was wondering if there are more efficient (time / memory) ways to do the calculations.

Otherwise, if there are no other ways, are there any useful viewing resources besides the Renderscript section of the Android website?

+4
source share
2 answers

You have two options for calculating directly on the device:

Renderscript :

  • (+) Supports various types of current and future architecture.
  • (+) In the future, it will include calculations on the GPU.
  • (+) It is easily scalable to work on multiple cores.
  • (-) Minimum API level 11.

Android NDK :

  • (+) cross-platform code
  • (-) The application must be compiled for each available architecture by the developer.
  • (-) If a new architecture appears, a new assembly is required.
+2
source

How about doing the calculations on the server and sending the results to the Android device?

You can implement a RESTful service server server and call it via http from Android .

0
source

All Articles