Date: Sat, 8 Feb 2003 15:27:24 -0800 From: David Schultz <dschultz@uclink.Berkeley.EDU> To: Ray Kohler <ataraxia@cox.net> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Compiling with high optimization? Message-ID: <20030208232724.GA20435@HAL9000.homeunix.com> In-Reply-To: <20030208173756.GA56030@arkadia.nv.cox.net> References: <20030208173756.GA56030@arkadia.nv.cox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Ray Kohler <ataraxia@cox.net>: > Has anyone tried building world/kernel with high optimizations (-O2, > -O3) recently? What breaks? (Booby prize to whoever says "common sense" > ;) I last tried it quite a few months ago and the resolver died on me, > don't know what else. I'm not really thinking of running like that, but > I am curious about others' experiences. First, let me answer the question that you really meant to ask but forgot to, namely, ``How much of a performance difference does -O3 make over -O for the kernel/world?'' The answer is ``very little, for most purposes.'' So if you do use higher optimization levels, at least do a little benchmarking to make sure it was worth it. To answer your second question, higher optimization levels usually work, but there *will* be new bugs. I know of several libc problems due to -fstrict-aliasing, and I'm told that the inline assembly for TCP checksumming can still break. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030208232724.GA20435>