From owner-freebsd-hackers Mon Apr 17 5:32:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gilgamesch.bik-gmbh.de (T1-Hansenet.BIK-GmbH.de [192.76.134.246]) by hub.freebsd.org (Postfix) with ESMTP id CF49637B5E6 for ; Mon, 17 Apr 2000 05:32:09 -0700 (PDT) (envelope-from cracauer@gilgamesch.bik-gmbh.de) Received: (from cracauer@localhost) by gilgamesch.bik-gmbh.de (8.9.3/8.7.3) id OAA07567; Mon, 17 Apr 2000 14:21:08 +0200 (MET DST) Date: Mon, 17 Apr 2000 14:21:08 +0200 From: Martin Cracauer To: "Alexey N. Dokuchaev" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: What are the best gcc optimization options for Pentium 200 MMX Message-ID: <20000417142108.B6672@cons.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: ; from danfe@inet.ssc.nsu.ru on Sat, Apr 08, 2000 at 09:25:16PM +0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In , Alexey N. Dokuchaev wrote: > Hi! > > AFAIK, Linux Mandrake has it's kernel and userland highly optimized for > Pentium architecture. However, they have additional gcc optimization > flags turned on by default, including -O3 and -mfast_math. That they care for -mfast-math in the floatingpoint-free kernel shows that they don't know what they do. Also, both the Linux and the FreeBSD kernel suffered from unclean code that a ANSI-C conformant compiler was allowed to break (especially missing volatile's). Since they are fixed independetly of each other and since these breakages change with compiler releases, you can't make any assumptions about other kernel/compiler combinations from experience with one combination. Also, new kernel code that people commit is tested against -O1, so for each kernel update you had to retest the compiler settings again until FreeBSD's official flags are raised. FreeBSD uses -O1 because of bugs we encountered with higher settings, not for compile speed, in case anyone questions this. The time needed to investigate the ability to use higher settings and redo this for every minor compiler or assembler update is much better spent in improving the structure of the kernel, the gain from higher -O settings is just too small to bother. (Not that we couldn't improve compiler testing before importing new ones...). -O6 is like overclocking, except (much) less gain and no mineral oil for cooling available, hence you don't even get a cooler (hehe) looking computer. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message