delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/27/07:59:37

Date: Tue, 27 Jan 1998 14:57:50 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Sampo Niskanen <sampo AT lizard DOT compart DOT fi>
cc: djgpp AT delorie DOT com
Subject: Re: Why only -O2?
In-Reply-To: <6aijk6$4g6@news.xgw.fi>
Message-ID: <Pine.SUN.3.91.980127145732.843H-100000@is>
MIME-Version: 1.0

On 26 Jan 1998, Sampo Niskanen wrote:

> Shouldn't -O3 optimize even more?

This is mostly true only in short sources, typically those which
define a small number of simple functions (that's why the DJGPP C
library is compiled with -O3).

-O3 adds function inlining, so when you turn it on for large sources,
you get bloated code which is usually slower than the one produced by
-O2 because it causes more misses in the CPU code cache.

> Also, what optimization level does -O use?

The specific optimizations turned on by each level are listed in the
GCC docs (from the DOS prompt type "info gcc invoking optimize" and
read there).

- Raw text -


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