This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc: Optimization Options
- To: Ednardo Lobo <loboe at beg dot com dot br>
- Subject: Re: gcc: Optimization Options
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 26 Jul 2000 15:08:30 -0300
- Cc: help-gcc <help-gcc at gnu dot org>
- Organization: GCC Team, Red Hat
- References: <397F42EE.C65F1DBF@beg.com.br>
On Jul 26, 2000, Ednardo Lobo <loboe@beg.com.br> wrote:
> Which of them (-O1, -O2, -O3) build the binary more optimizate and of
> the smaller size??
The higher the number after -O, the more optimization attempts you'll
get. However, not all optimizations always improve the performance.
-O3 often increases code size and this may introduce significant cache
penalties, so the code may actually run slower than -O2, and -O2 is
almost always faster than -O.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me