Im still confused what flags to use in mingw (gcc 4.7.1) to optymize binary as far as its possible -
especially that this gcc dosumentation is partially weakly written
for example i do understand (hopefully correct)
1) that -march says what instruction set i should restrict compiler to use (for example setting -march=pentium3 makes my binary onlu with instructions awaliable on pentium3)
2) also i understand that -mtune says to what target the previous instructions do optymize, for example i can get p3 instructions and optymize it for core2
confusingly the docs say
"-march=cpu-type Generate instructions for the machine type cpu-type. The choices for cpu-type are the same as for -mtune. Moreover, specifying -march=cpu-type implies -mtune=cpu-type. "
I doubt if this is true - does this mean that when choicing -march=pentium3 -mtune=generic the mtune setting is discarded and this is equiwalent of
-march=pentium3 -mtune=pentium3 ? dont think so (this is confusing)
i would like to chose resonable codeset that would be working on older
machines but also working ok on more modern ones I chose -march=pentium3 as i doubt if someone uses something older than p3 and I didnt noticed noticable change when putting something newer here (like -march=core2 - i dint notice any speedup)
what in general i can yet add to this commandline to speed things up ?
(or throw away some runtime or exception stuff bytes or something like that)
Edited by fir, 22 June 2014 - 04:08 AM.