FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s gcc2.9.5)

Dan Nelson dnelson at allantgroup.com
Tue Feb 10 14:37:10 PST 2004


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 at allantgroup.com


More information about the freebsd-hackers mailing list