This is the mail archive of the
mailing list for the GCC project.
Re: Related to Optmization Options in GCC
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
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.