From owner-freebsd-mobile Sun Sep 17 9:46:58 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by hub.freebsd.org (Postfix) with ESMTP id 14EC737B422 for ; Sun, 17 Sep 2000 09:46:55 -0700 (PDT) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.10.0/jtpda-5.3.3) with ESMTP id e8HGkr997333 for ; Sun, 17 Sep 2000 18:46:53 +0200 (CEST) Received: from rose.lpthe.jussieu.fr ([134.157.10.102]) by parthe.lpthe.jussieu.fr (8.9.1a/jtpda-5.3.1) with ESMTP id SAA01298 for ; Sun, 17 Sep 2000 18:46:52 +0200 (MET DST) Received: (from michel@localhost) by rose.lpthe.jussieu.fr (8.9.3/8.9.3) id XAA00869 for freebsd-mobile@FreeBSD.ORG; Sat, 16 Sep 2000 23:04:50 +0200 (CEST) (envelope-from michel) Date: Sat, 16 Sep 2000 23:04:50 +0200 From: Michel Talon To: freebsd-mobile@FreeBSD.ORG Subject: Re: pcmcia, sound questions on thinkpad Message-ID: <20000916230450.A802@lpthe.jussieu.fr> Mail-Followup-To: freebsd-mobile@FreeBSD.ORG References: <8525695B.005723EB.00@ams-central-gate-5a.amsinc.com> <200009151739.LAA06959@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <200009151739.LAA06959@harmony.village.org> Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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