*BSD News Article 87974


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.ysu.edu!news.radio.cz!voskovec.radio.cz!news.radio.cz!CESspool!hammer.uoregon.edu!arclight.uoregon.edu!news.sprintlink.net!news-peer.sprintlink.net!news.sprintlink.net!news-hub.sprintlink.net!news.sprintlink.net!news-fw-6.sprintlink.net!helena.MT.net!nate
From: nate@see.my.signature (Nate Williams)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: FreeBSD slower than Linux ?
Date: 31 Jan 1997 17:29:59 GMT
Organization: SRI Intl. - Montana Operations
Lines: 43
Message-ID: <5cta6n$eio@helena.MT.net>
References: <dkleinh.854654600@isotope.ps.uci.edu> <5crh6q$44j@synge.maths.tcd.ie> <87iv4ezj3c.fsf@mirriwinni.cse.rmit.edu.au>
NNTP-Posting-Host: trout.mt.sri.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:34799

In article <87iv4ezj3c.fsf@mirriwinni.cse.rmit.edu.au>,
Phillip Musumeci <phillip@rmit.edu.au> wrote:
>>>>>> "David" == David Malone <dwmalone@maths.tcd.ie> writes:

>    >> I'm compiling my program with the stock g77 that comes with each OS.
>    >> I know Linux is using gcc-2.7.2 and FreeBSD is using gcc-2.6.3 and
>    >> so I went back to my old Slackware 2.3, which has gcc-2.6.3 and this
>    >> was still twice as fast.  Anyone have any ideas why ?
>
>    David> One thing that it might be is that the FreeBSD maths libraries
>    David> don't have FPU code in them the way they are distributed, if you
>    David> recompile them with HAVE_FPU=yes in /etc/make.conf this might
>    David> make quite a difference for some things.
>
>Even though this could hurt people without FPUs, maybe we really should
>have the standard system optimised for those with FPUs.

Umm, no.  You can't emulate hardware floating point calls, which is what
happens when you compile the libraries with HAVE_FPU.  Also, the stock
FPU emulator basically 'sucks' (there is the ability of using the GPL
one, but it's not used by default due to the GPL).  When deciding to
make a release, you choose the 'largest compatability' set, not the
optimized set.

It's really trivial to re-compile the math libraries, probably less so
than a long run of the program. :)

[ Assuming HAVE_FPU has been uncommented in /etc/make.conf ]

# cd /usr/src/lib/libmsun
# make depend all install

Re-run the application and it should run much faster.



Nate

-- 
nate@sri.com           | Research Engineer, SRI Intl. - Montana Operations
work #: (406) 457-9000 | 
nate@trout.mt.sri.com  | An unfeatured document is a bug.
home #: (406) 443-7063 |                                - John Polstra