lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 25 Jun 2007 09:08:23 +0200 From: Segher Boessenkool <segher@...nel.crashing.org> To: Willy Tarreau <w@....eu> Cc: Benjamin LaHaise <bcrl@...ck.org>, linux-kernel@...r.kernel.org, Arjan van de Ven <arjan@...radead.org>, Adrian Bunk <bunk@...sta.de>, david@...g.hm, Oleg Verych <olecom@...wer.upol.cz>, rae l <crquan@...il.com> Subject: Re: -Os versus -O2 > In my experience, -Os produced faster code on gcc-2.95 than -O2 or -O3. On what CPU? The effect of different optimisations varies hugely between different CPUs (and architectures). > It was not only because of cache considerations, but because gcc used > different tricks to avoid poor optimizations, and at the end, the CPU > ended executing the alternative code faster. -Os is "as fast as you can without bloating the code size", so that is the expected result for CPUs that don't need special hand-holding around certain performance pitfalls. > With gcc-3.3, -Os show roughly the same performance as -O2 for me on > various programs. However, with gcc-3.4, I noticed a slow down with > -Os. And with gcc-4, using -Os optimizes only for size, even if the > output code is slow as hell. I've had programs whose speed dropped > by 70% using -Os on gcc-4. Well you better report those! <http://gcc.gnu.org/bugzilla> > But in some situtations, it's desirable to have the smallest possible > kernel whatever its performance. This goes for installation CDs for > instance. There are much better ways to achieve that. Segher - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists