Inder wrote:
Hi All,

 From the GCC manual, its clear that optimization options from –O1 to
–O3 or any greater level emphasis On the performance while –Os
emphasis only on the code size, it (-Os) says nothing about the
performance (execution time).

In our case : Size in case of –Os is less than that in case of –O4
that is according to the
manual  but the performance is also better in –Os case. So, Can we
predict something like that the performance in case of –Os will always
be better than that is in –O4 or it is just undefined (Can be better
or worse)

This is the case. Actually some optimizations at -Os have definitely a negative effect on performance.

Also, -O3 to -O9 are the same set of options.

Paolo

Reply via email to