From: "John M. Aldrich" 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: NNTP-Posting-Host: ppp204.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 | ---------------------------------------------------------------------