android - Producing optimised NDK code for multiple architectures? -
i have c code android lots of low-level number crunching. i'd know settings should use (e.g. android.mk , application.mk) files code produced run on current android devices takes advantage of optimisations specific chipsets. i'm looking default android.mk , application.mk settings use , want avoid having litter c code #ifdef branches. for example, i'm aware armv7 has floating point instructions , armv7 chips support neon instructions , default arm supports neither of these. possible set flags can build armv7 neon, armv7 without neon , default arm build? i'm know how latter 2 not 3. i'm cautious settings use assume current defaults safest settings , risks other options have. for gcc specific optimisation, i'm using following flags: local_cflags=-ffast-math -o3 -funroll-loops i've checked 3 of these speed code. there other common ones add? another tip have add "local_arm_mode := arm" android.mk enable speed on newer arm chips (although ...