From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 10 14:37:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB24316A4CE for ; Tue, 10 Feb 2004 14:37:09 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 922D543D45 for ; Tue, 10 Feb 2004 14:37:09 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i1AMb9gh019666; Tue, 10 Feb 2004 16:37:09 -0600 (CST) (envelope-from dan) Date: Tue, 10 Feb 2004 16:37:08 -0600 From: Dan Nelson To: Wes Peters Message-ID: <20040210223708.GC44504@dan.emsphone.com> References: <200402101129.34337.wes@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200402101129.34337.wes@softweyr.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: freebsd-hackers@freebsd.org cc: Juan Tumani Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s gcc2.9.5) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 22:37:10 -0000 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