Date: Thu, 5 Dec 2002 06:06:22 -0800 From: David Schultz <dschultz@uclink.Berkeley.EDU> To: Evren Yurtesen <eyurtese@turkuamk.fi> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: -O3 optimization? Message-ID: <20021205140622.GB12456@HAL9000.homeunix.com> In-Reply-To: <Pine.A41.4.10.10212051522150.93290-100000@bessel.tekniikka.turkuamk.fi> References: <20021205131130.GB11161@HAL9000.homeunix.com> <Pine.A41.4.10.10212051522150.93290-100000@bessel.tekniikka.turkuamk.fi>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Evren Yurtesen <eyurtese@turkuamk.fi>: > 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... -O is the most widely tested setting, and it is significantly faster than no optimization. The higher optimization levels usually increase performance marginally, but they're still just microoptimizing. Maybe if you were running some compute-intensive scientific software you would see more of a difference. > 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? I don't know of any serious benchmarks. Try compiling the software in question with -O3. If it works and performs better, great; if you can't tell the difference you might want to be a bit more conservative about the setting... 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?20021205140622.GB12456>