www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/03/22:03:46

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ! Optimization in Practice
Date: Fri, 03 Apr 1998 18:34:24 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 18
Message-ID: <35257200.2C7B@cs.com>
References: <C12565DB DOT 003ACF44 DOT 00 AT vega DOT ads DOT it>
NNTP-Posting-Host: ppp204.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

G DOT DegliEsposti AT ads DOT it wrote:
> 
> If this can explain why use -O2 in stead of -O3, I agree
> with you on one point: why -O1 in stead of -O2 ?
> Maybe the switch is available for backward compatibility ?

Each of the optimization levels takes progressively more time to
compile, and -O2 doesn't increase speed over -O1 by as much as -O1
increases speed over non-optimized code.  For myself, I always use -O2
in production code.  The various options exist for flexibility.  :-)

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "A committee is a life form with six |
|       aka Fighteer I       | or more legs and no brain."          |
|   mailto:fighteer AT cs DOT com   |                                      |
| http://www.cs.com/fighteer |                 - Lazarus Long       |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019