This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Related to Optmization Options in GCC


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]