Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] more CFLAG
Date: Wed, 17 May 2006 05:37:08
Message-Id: 7573e9640605162213k794d41e9v92fcae2e1c8dced4@mail.gmail.com
In Reply to: Re: [gentoo-user] more CFLAG by James Ausmus
1 On 5/16/06, James Ausmus <james.ausmus@×××××.com> wrote:
2 > > Does the `O' (uppercase oh) have an `s' component?
3 > >
4 > Yes - the -O setting is the level of code optimization that gcc does -
5 > -Os is very similar to -O2, but also does code size optimization,
6 > which may, under some circumstances, result in slower performance, but
7 > will also, in other circumstances, result if faster performance.
8
9 BTW, I measured the performance differences for the things I care
10 about (compression, media encoding, and dm-crypt encryption), and
11 ended up choosing -Os for my Core Duo system. As James says, some
12 things run faster, other things run slower. And it isn't across the
13 board...bzip2 -1 can give completely different results than bzip2 -9.
14 The differences generally are within +/- 10% of the -O2 performance.
15
16 The major advantage to -Os (aside from smaller executables), is
17 compile time. Especially C++ programs take noticably less time to
18 compile with -Os than with -O2 or -O3.
19
20 -Richard
21
22 --
23 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: more CFLAG Harry Putnam <reader@×××××××.com>