[Nexus 4 Q&A, Help & Troubleshooting] Azurael:
Most of the big performance boosts we've had lately have come from the Krait optimised Bionic library, and things like Linaro's strict aliasing patches (Linaro's compiler by itself makes nearly no difference, it really isn't the magic bullet a lot of so-called 'devs' are trying to give people the impression it is - my own builds have been done with Linaro's toolchain for a long time and it does nada by itself.)

However, it seems to me from watching the GIT repos of some of the more optimised ROMs appearing lately that developers are playing with various CFlags to try and optimise for this specific platform. As we know, there isn't a specific flag (either mtune or mcpu) for Krait:

Permissible names are: `arm2', `arm250', `arm3', `arm6', `arm60', `arm600', `arm610', `arm620', `arm7', `arm7m', `arm7d', `arm7dm', `arm7di', `arm7dmi', `arm70', `arm700', `arm700i', `arm710', `arm710c', `arm7100', `arm720', `arm7500', `arm7500fe', `arm7tdmi', `arm7tdmi-s', `arm710t', `arm720t', `arm740t', `strongarm', `strongarm110', `strongarm1100', `strongarm1110', `arm8', `arm810', `arm9', `arm9e', `arm920', `arm920t', `arm922t', `arm946e-s', `arm966e-s', `arm968e-s', `arm926ej-s', `arm940t', `arm9tdmi', `arm10tdmi', `arm1020t', `arm1026ej-s', `arm10e', `arm1020e', `arm1022e', `arm1136j-s', `arm1136jf-s', `mpcore', `mpcorenovfp', `arm1156t2-s', `arm1156t2f-s', `arm1176jz-s', `arm1176jzf-s', `cortex-a5', `cortex-a7', `cortex-a8', `cortex-a9', `cortex-a15', `cortex-r4', `cortex-r4f', `cortex-r5', `cortex-m4', `cortex-m3', `cortex-m1', `cortex-m0', `cortex-m0plus', `marvell-pj4', `xscale', `iwmmxt', `iwmmxt2', `ep9312', `fa526', `fa626', `fa606te', `fa626te', `fmp626', `fa726te'.

Krait supports vfpv4 and neon, so we should be using at least -mfpu=neon-vfpv4 on top of whatever cflags are currently thought best...

Somebody must have a Krait-based system that can run GCC4.6/4.7? - Rather than guessing, can't we take a look at what mtune/mcpu=native throws out on Krait? Or does 'native' not work on ARM?

For example: -march=native on my desktop gives me the following:

-march=corei7-avx -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=corei7-avx

I'd imagine this is all standard corei7-avx stuff, bar the cache sizes, but corei7-avx is pretty specific to a Sandy Bridge/Ivy Bridge-based system, whereas there is nothing specific to Krait.

If we really wanted to push the boat out, we could use acovea to see what the fastest specific flags are (although I guess you'd want to use different source to that acovea ships with as it's probably not too relevant to typical uses of an Android device :P)

Any thoughts on this matter? Am I just madly obsessed with things that make no difference? I'm going to put together some new AOKP PUB builds today since that's my favourite ROM but it would be interesting to have the insight of somebody who actually knows what they're talking about...