From owner-freebsd-stable Fri Oct 27 0:36:25 2000 Delivered-To: freebsd-stable@freebsd.org Received: from saarinen.org (saarinen.org [203.79.82.14]) by hub.freebsd.org (Postfix) with ESMTP id 5161337B479 for ; Fri, 27 Oct 2000 00:36:22 -0700 (PDT) Received: from vimfuego.saarinen.org (softdnserr [::ffff:192.168.1.1]) (IDENT: foobar) by saarinen.org with esmtp; Fri, 27 Oct 2000 20:36:13 +1300 Date: Fri, 27 Oct 2000 20:36:12 +1300 (NZDT) From: Juha Saarinen To: Michel Talon Cc: "freebsd-stable@FreeBSD.ORG" Subject: Re: "Malloc type lacks magic" show-stopper solved In-Reply-To: <20001027092841.B394@lpthe.jussieu.fr> Message-ID: X-S: Always Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Kernel code is simple with essentially no computations (except of course > special domains like crypto in kernel). So there is no much room for > optimizations. Recently i have timed a scientific program to see the > performances of my brand new PC. Here is what i found: > Without any optimization the program runs 2 times slower. With > -O -O2 -O3 -Os the times are similar, the fastest was -O the slowest > was -Os. Since my PC is Duron based i have tried -march things, and have > compared on a pentium machine. Result, almost nothing, except -march pentium > was slower than -march k6 on the Duron as could be expected. All differences > are small, no more than 2s on a 30s computation. As you can see nothing that > counterbalances the risk of bugs. > > More generally, gcc does not output specialized instructions like 3dNow and so > on. These have to be hand coded in assembly if you want them. An exemple is > the mp3 compressor gogo which is coded in assembly and has to be compiled with > nasm because gas is not even able to understand these instructions. So don't > think you can obtain something well optimized with gcc. > > To illustrate this, i have some years ago tested a scientific program on an > alpha machine running linux. Compiled with gcc and the best optimizations it > runned 7 times slower than compiled with Digital compiler. Conclude by > yourself. Thanks, Michel, for taking the time to explain the above. Very useful information indeed, and I didn't consider the fact that gcc does not handle e.g. 3DNow! instructions (presumably it doesn't do MMX either?). -- Juha To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message