cnHackintosh / ratproxy

Automatically exported from code.google.com/p/ratproxy
0 stars 0 forks source link

is there a reason to use -03 optimization. #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$subject

Original issue reported on code.google.com by rakesh.p...@gmail.com on 8 Nov 2008 at 3:44

GoogleCodeExporter commented 8 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
This snippet is quoted from some gcc book.

Original comment by rakesh.p...@gmail.com on 11 Dec 2008 at 4:19