2

I am performing floating point and GPU operations using C++ on android. I would like to know what are the various compiler optimization flags to improve speed of execution of these operations , I just want to make the native code more faster using compiler flags and learn more about these flags.

The flags that I have found so far which improve my operations:

-std=c++11 
-mtune=arm7
-mfpu=vfpv3-d16 
-mfloat-abi=softfp 
Nimrod Borochov
  • 356
  • 3
  • 17

1 Answers1

0

You can use -ffast-math if you can garantee to the compiler that your code is safe from these optimizations.

Also take a look from Android documentation about NEON. NEON with -ffast-math will allow the compiler to do automatic vectorization of your code

Community
  • 1
  • 1
Nicola Bizzoca
  • 1,125
  • 8
  • 7