On 5/16/06, James Ausmus <[EMAIL PROTECTED]> wrote:
> Does the `O' (uppercase oh) have an `s' component?
>
Yes - the -O setting is the level of code optimization that gcc does -
-Os is very similar to -O2, but also does code size optimization,
which may, under some circumstances, result in slower performance, but
will also, in other circumstances, result if faster performance.

BTW, I measured the performance differences for the things I care
about (compression, media encoding, and dm-crypt encryption), and
ended up choosing -Os for my Core Duo system.  As James says, some
things run faster, other things run slower.  And it isn't across the
board...bzip2 -1 can give completely different results than bzip2 -9.
The differences generally are within +/- 10% of the -O2 performance.

The major advantage to -Os (aside from smaller executables), is
compile time.  Especially C++ programs take noticably less time to
compile with -Os than with -O2 or -O3.

-Richard

--
[email protected] mailing list

Reply via email to