This is the mail archive of the gcc-help@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]

Re: gcc: Optimization Options


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


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