From: Zack Weinberg <zack@codesourcery.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Kernel GCC Optimizations
Date: Sat, 21 Dec 2002 23:57:12 -0800 [thread overview]
Message-ID: <87k7i2wko7.fsf@egil.codesourcery.com> (raw)
In-Reply-To: <200212212244.gBLMixLR002262@darkstar.example.net>
> > So, let's make it -O6 per default for 2.7.x/3.1.x?
>
> A higher -O setting does not necessarily mean better performance -
> loop unrolling is one compiler optimisation that I *think* is
> performed by GCC at high -O settings, and that *often* causes code to
> be slower.
In all official releases of GCC, -Ox, x >= 4, has exactly the same
effect as -O3. This is unlikely to change anytime soon.
-O3 enables exactly two optimizations relative to -O2:
-finline-functions and -frename-registers. This may or may not change
in the future. It does *not* enable loop unrolling. -finline-functions
is almost always a major performance loss, because it makes the code
huge and blows out the I-cache. I'm not familiar with the performance
effects of -frename-registers; it might be worth experimenting with
just that switch.
zw
next prev parent reply other threads:[~2002-12-22 7:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-21 17:35 Kernel GCC Optimizations Ro0tSiEgE
2002-12-21 18:08 ` axel
2002-12-21 22:13 ` folkert
2002-12-21 18:11 ` John Bradford
2002-12-21 22:10 ` folkert
2002-12-21 22:44 ` John Bradford
2002-12-22 7:57 ` Zack Weinberg [this message]
2002-12-22 1:20 ` scott thomason
2002-12-22 1:26 ` Arnaldo Carvalho de Melo
2002-12-22 1:26 ` Robert Love
-- strict thread matches above, loose matches on Subject: below --
2002-12-22 13:23 Joao Seabra
2002-12-25 6:16 ` Adam Majer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k7i2wko7.fsf@egil.codesourcery.com \
--to=zack@codesourcery.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox