Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2004 16:37:08 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Wes Peters <wes@softweyr.com>
Cc:        Juan Tumani <jtumani55@hotmail.com>
Subject:   Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s gcc2.9.5)
Message-ID:  <20040210223708.GC44504@dan.emsphone.com>
In-Reply-To: <200402101129.34337.wes@softweyr.com>
References:  <BAY12-F37zmBUw7MurD00010899@hotmail.com> <200402101129.34337.wes@softweyr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 10), Wes Peters said:
> On Monday 09 February 2004 13:20, Juan Tumani wrote:
> > I have an Intel D845GE m/b w/ a P4 1.7 CPU and I have the box setup
> > to dual boot to either 4.9 or 5.2.  Both OS are right off the
> > latest posted iso CD image, i.e., no updates, no kernel tweaks,
> > everything vanilla right out of the box.  I compiled flops.c on
> > both 4.9 and 5.2 and the 5.2 performance is less than half that of
> > 4.9: 760 MFLOPS on 4.9 v/s 340 MFLOPS on 5.2.

This sounds suspiciously like a stack alignment problem.  Try running
the following and see if your run times alternate between fast and
slow every 4 runs:

PAD= ; export PAD ; while : ; do ; PAD=z$PAD ; /usr/bin/time ./flops ; done

Back in 2000, Bruce Evans posted the following patch that fixed the
alignment problem on his system:

http://www.freebsd.org/cgi/getmsg.cgi?fetch=438552+0+/usr/local/www/db/text/2000/freebsd-current/20000507.freebsd-current

I don't believe either gcc 2.95 or 3.3 will align the stack themselves. 
icc does seem to.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040210223708.GC44504>