|
Message-ID: <20170720014556.GT1627@brightrain.aerifal.cx> Date: Wed, 19 Jul 2017 21:45:56 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] prefer Oz optimization if the compiler supports it On Wed, Jul 19, 2017 at 04:48:49PM +0300, Dmitry Golovin wrote: > In theory Oz should produce slimmer binary than Os, but I want first > to perform tests to see how optimization level really affects size > and performance. My impression is that clang's -O2 and -Os are comparable in goals to gcc's -Os, and that -Oz just makes some minor size-improvement tradeoffs that could be bad for performance. I've been wanting for a while to actually drop use of -Os with selective -O3 for some dirs, and instead use -O2 for everything by default. With recent compilers, -Os seems to do gratuitously stupid things, and doesn't make much of a size difference vs -O2 (and even less so if you use -fno-align-*). The main thing that's kept me from actually pursuing such a change is not having had time to test the effects myself or work with someone else to get it done. Rich > 19.07.2017, 15:52, "Rich Felker" <dalias@...c.org>: > > On Wed, Jul 19, 2017 at 01:44:17PM +0300, Dmitry Golovin wrote: > >> Hi all! > >> > >> This is a very small and simple patch, it adds support for Oz level > >> of optimization (clang supports it). Since the kernel switched to > >> Oz, I think it's a good idea to use it as long as the compiler > >> supports it, on the other hand I didn't test if it has any > >> advantages in case of musl. > >> > >> The patch is attached. > > > > I'm not clear what the goal is. Why would Oz be preferred to Os? A > > quick search shows that all it seems to do is disabling some > > vectorization, which sounds undesirable. > > > > Rich
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.