Closed GoogleCodeExporter closed 9 years ago
[Sorry for a delay]
There is no specific reason, other than the fact there is no reason not to? It
has a
minor performance benefit and no significant side effects in this case? Is this
a defect?
Original comment by lcam...@gmail.com
on 10 Dec 2008 at 5:41
This option turns on more expensive optimizations, such as func-
tion inlining, in addition to all the optimizations of the lower levels
‘-O2’ and ‘-O1’. The ‘-O3’ optimization level may increase the speed
of the resulting executable, but can also increase its size. Under
some circumstances where these optimizations are not favorable,
this option might actually make a program slower.
It is important to remember that the benefit of optimization at the
highest levels must be weighed against the cost. The cost of optimization
includes greater complexity in debugging, and increased time and memory
requirements during compilation. For most purposes it is satisfactory to
use ‘-O0’ for debugging, and ‘-O2’ for development and deployment.
Original comment by rakesh.p...@gmail.com
on 11 Dec 2008 at 4:18
This snippet is quoted from some gcc book.
Original comment by rakesh.p...@gmail.com
on 11 Dec 2008 at 4:19
Original issue reported on code.google.com by
rakesh.p...@gmail.com
on 8 Nov 2008 at 3:44