Date: Sat, 16 Sep 2000 23:04:50 +0200 From: Michel Talon <michel@lpthe.jussieu.fr> To: freebsd-mobile@FreeBSD.ORG Subject: Re: pcmcia, sound questions on thinkpad Message-ID: <20000916230450.A802@lpthe.jussieu.fr> In-Reply-To: <200009151739.LAA06959@harmony.village.org> References: <8525695B.005723EB.00@ams-central-gate-5a.amsinc.com> <200009151739.LAA06959@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 15, 2000 at 11:39:15AM -0600, Warner Losh wrote: > In message <8525695B.005723EB.00@ams-central-gate-5a.amsinc.com> Ben_Calvert@amsinc.com writes: > : oh - and one final question - the GENERIC kernel has -O set in it's compiler > : flags, am wondering why? (am used to -O2 in linux) will i break anything if i > : change this? > > Yes. -O2 produces bad code (even on Linux) so it shouldn't be used. > > Warner > Moreover, i have just tested the various levels of optimization of gcc on a test program that some friend has given me. It is a Monte Carlo program in statistical maechanics, so computes a lot of random numbers, but all computations are integer and not floating point. In this sense it is not so different to an OS. Well i have been much surprised by the result! The best time i have gotten is with -O, the worst with -Os, and -O3 is in between. The -march=pentiumpro makes very small difference. Of course without any optimization the execution time doubles. Considering this the recommended (by freebsd doc.) setting of -O -pipe will speed up the compilation and perhaps produce the fastest code. Note that i have run the same program through the Portland compiler and it runs much faster. One more example of the inefficiency of the Gnu compiler even on x86 architecture. -- Michel Talon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000916230450.A802>