Date: Thu, 5 Dec 2002 15:26:38 +0200 (WET) From: Evren Yurtesen <eyurtese@turkuamk.fi> To: David Schultz <dschultz@uclink.Berkeley.EDU> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: -O3 optimization? Message-ID: <Pine.A41.4.10.10212051522150.93290-100000@bessel.tekniikka.turkuamk.fi> In-Reply-To: <20021205131130.GB11161@HAL9000.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Well, I made searches from google and people talk that O3 produced quite noticably faster code. But well I am not so hungry for speed. I just wondered if the binary might have something wrong with it or not even though the compiler didnt complain while compiling. What about using -O or not using any optimizations? Is it very rare that -O breaks somethings? I was using -Os and I also didnt notice anything wrong but maybe there can be something I am missing too... Is there big performance improvement between -O and -O2 ? or from not using any optimizations to -O or -O2? Lets say if I am compiling KDE,XFree86. How much would it effect? is there a web page with some statistical data about this? Evren On Thu, 5 Dec 2002, David Schultz wrote: > Thus spake Evren Yurtesen <eyurtese@turkuamk.fi>: > > I wonder if a source is compiled with -O3 without any problems, might > > there be any problems in binaries which might create crashes? > > You're welcome to try it out, but it isn't supported. GCC has a > few obscure misfeatures at -O3. Some applications break at -O3, > usually because they violate C's aliasing rules or contain broken > inline assembly. At one point, the kernel's TCP checksum code had > some difficult-to-solve problems with -O3, and I'm not sure > whether that has been fixed. > > Despite all of that, I built world and kernel with -O2 a while ago > and noticed no problems whatsoever. Just note that you've been > warned, and you probably won't see a significant performance > improvement anyway. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.10.10212051522150.93290-100000>