Best speed switches for gcc
So far I've noticed that:
-O3 and -fomit-frame-pointer significantly speed up my proggies.
Are there other goodies I missed for maxing speed?
Barring for now an assembly rewrite of the choke points. I'll get there later.
Yes, I can RTFM, but what really works? vs. what's available.
for the morbidly curious only
I know that program optimization can be fickle. But I'm trying to learn what I can about gcc switches & I figured I'd share my findings. It is odd to see how many of the switches slow things down, but of course they may do the reverse in other situations.
I was able to lose another second with -fdelete-null-pointer-checks & -fschedule-insns2. But i would be skeptical about using them in other situations & my testing shows little or no gain as a rule.
On the other hand, the -O3, -fomit-frame-pointer & -mcpu=whatever seem to be winners on all of the compute bound programs I tested. Still a small N tho & limited to integer math.
Easy-to-read source code optimizations (only in the problem area) have also been big winners.