Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2000 13:50:13 +0200 (IST)
From:      Roman Shterenzon <roman@harmonic.co.il>
To:        Michel Talon <michel@lpthe.jussieu.fr>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: "Malloc type lacks magic" show-stopper solved
Message-ID:  <Pine.LNX.4.10.10010301347290.17779-100000@shark.harmonic.co.il>
In-Reply-To: <20001025090958.A435@lpthe.jussieu.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10010301347290.17779-100000>