On 20 November 2015 at 17:47, staticx <mohamedboussaa3@xxxxxxxxx> wrote: > Here, I compile an input program with -O2 optimization level (with gcc 4.8.4) > and measure the execution time: > > gcc -O2 -c test.c -o obj.o > TIMEFORMAT='%3R' && time(./obj.o) > execution time = 1.825 > > and when I replace -O2 flag with the list of options that are turned on as > defined in GCC manuel in the level -O2 > https://gcc.gnu.org/onlinedocs/gcc-4.8.4/gcc/Optimize-Options.html#Optimize-Options > like that: As I'm sure has been explained to you already, and as stated at the link you give: "Most optimizations are only enabled if an -O level is set on the command line. Otherwise they are disabled, even if individual optimization flags are specified. " This means if you don't use some -Ox option then there is NO OPTIMISATION. It doesn't matter if you use a list of options, that does not turn those optimisations on.