From owner-freebsd-stable Mon Oct 30 3:50:39 2000 Delivered-To: freebsd-stable@freebsd.org Received: from shark.harmonic.co.il (jupiter.harmonic.co.il [192.116.140.62]) by hub.freebsd.org (Postfix) with ESMTP id 810AD37B4C5 for ; Mon, 30 Oct 2000 03:50:36 -0800 (PST) Received: from localhost (roman@localhost) by shark.harmonic.co.il (8.9.3/8.9.3) with ESMTP id NAA18173; Mon, 30 Oct 2000 13:50:13 +0200 Date: Mon, 30 Oct 2000 13:50:13 +0200 (IST) From: Roman Shterenzon To: Michel Talon Cc: freebsd-stable@FreeBSD.ORG Subject: Re: "Malloc type lacks magic" show-stopper solved In-Reply-To: <20001025090958.A435@lpthe.jussieu.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 25 Oct 2000, Michel Talon wrote: > On Wed, Oct 25, 2000 at 07:45:24PM +1300, Juha Saarinen wrote: > > %-> Anything above -O is not recommended. I've had problems with > > %-> optimisation above -O under gcc on Intel (FreeBSD & Linux) ever since I > > %-> converted from IBM mainframe to UNIX (religious experience). > > > > Thanks Cy. Still, it beggars the question... "why not?". I've not had any > > problems with -O3 on Linux 2.2 and 2.4, and like I said, it worked under > > FreeBSD 3.3. > > > > -- Juha > > First you don't have the same gcc version number in FreeBSD 3.3 and 4.1 and in > Linux. If you read Documentation/Changes in even the most recent Linux kernel > (4.0 Test 9) it is explicitly stated that old gcc is recommended over newer > ones, and that bugs occur with newer ones. > Second, i recommend you to write a program with a significative amount of > computations and compile it with all flags possible, -O -O2 -O3 -Os and > measure the execution time. You may be surprised. Last time i did that > -O was the faster! Verified by me as well, -O2, -O3 sometimes runs slower on my K6-2 . -march=... sometimes helps, sometimes doesn't, but always produces larger executable. I believe that no optimization can make up for bad coding :) Having something over -O is just a waste of everyone's time, just don't do it. --Roman Shterenzon, UNIX System Administrator and Consultant [ Xpert UNIX Systems Ltd., Herzlia, Israel. Tel: +972-9-9522361 ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message