Date: Tue, 27 Jan 1998 14:57:50 +0200 (IST) From: Eli Zaretskii To: Sampo Niskanen cc: djgpp AT delorie DOT com Subject: Re: Why only -O2? In-Reply-To: <6aijk6$4g6@news.xgw.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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).