Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 26 Oct 2011 10:22:37 +0400
From: Vasiliy Kulikov <>
Subject: Re: %optflags for new gcc


On Wed, Oct 26, 2011 at 08:52 +0400, Solar Designer wrote:
> 1. Use -Os instead of -O2.  BTW, the kernel already builds with -Os.
> In my (limited) testing, -Os results in significantly smaller code that
> is about as fast as -O2's (and is sometimes faster than -O2's).

IMHO -O2 is much, MUCH better and more consistent.  I heard numerous
complains about -Os like -Os doesn't do it's job well providing code
which is even bigger than with -O2.  Also sometimes -O2 is faster by
order of magnitudes.

I didn't thoroughly compared both variants, though.  I suppose the
latest versions of gcc were improving -O2 optimizations, but not -Os,
and the profit of -Os might be negligible in most (not all) cases.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.