From owner-freebsd-current@FreeBSD.ORG Sun Dec 17 16:11:05 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1062A16A403 for ; Sun, 17 Dec 2006 16:11:05 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 7E38143CB2 for ; Sun, 17 Dec 2006 16:10:57 +0000 (GMT) (envelope-from shoesoft@gmx.net) Received: (qmail invoked by alias); 17 Dec 2006 16:10:55 -0000 Received: from h081217095052.dyn.cm.kabsi.at (EHLO taxman.pepperland) [81.217.95.52] by mail.gmx.net (mp010) with SMTP; 17 Dec 2006 17:10:55 +0100 X-Authenticated: #16703784 From: Stefan Ehmann To: freebsd-current@freebsd.org Date: Sun, 17 Dec 2006 17:10:53 +0100 User-Agent: KMail/1.9.4 References: <20061213192150.CF83D16A417@hub.freebsd.org> <20061215205138.GB55276@dragon.NUXI.org> <20061217144425.GA1463@roadrunner.aventurien.local> In-Reply-To: <20061217144425.GA1463@roadrunner.aventurien.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612171710.55134.shoesoft@gmx.net> X-Y-GMX-Trusted: 0 Cc: Peter Jeremy , Steve Kargl Subject: Re: Let's use gcc-4.2, not 4.1 -- OpenMP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Dec 2006 16:11:05 -0000 On Sunday 17 December 2006 15:44, Ulrich Spoerlein wrote: > David O'Brien wrote: > > On Fri, Dec 15, 2006 at 07:14:53PM +0100, Stefan Ehmann wrote: > > > > CPU: AMD Athlon(TM) XP 2700+ (2166.44-MHz 686-class CPU) > > > > .. > > > > > Settings/Compiler | gcc-3.4 | gcc-4.1 | gcc-4.2 > > > ----------------------------+---------+---------+--------- > > > -O2 | 6.46s | 6.67s | 6.38s > > > -O2 -funroll-loops | 4.44s | 4.16s | 4.02s > > > -O2 -march=athlon-xp -fun.. | 4.39s | 4.38s | 4.26s > > > -O3 | 6.14s | 5.23s | 5.16s > > > -O3 -funroll-loops | 4.24s | 4.87s | 4.95s > > > -O3 -march=athlon-xp -fun.. | 4.19s | 4.90s | 5.07s > > > > A fine example that -O3 isn't always better than -O2. > > I wonder if you're blowing the L2 cache. IIRC, all Athlon XP 2700+ > > are the Thoughbread core, which has only 256KB L2. > > I'd be very much interested in -Os numbers. It should help with the > cache ... While -Os -funroll-loops seems a weird combination: Settings/Compiler | gcc-3.4 | gcc-4.1 | gcc-4.2 ----------------------------+---------+---------+--------- -Os | 6.96s | 6.48s | 6.69s -Os -funroll-loops | 5.01s | 4.63s | 4.58s -Os -march=athlon-xp -fun | 4.93s | 4.69s | 4.64s We probably should stop exploiting my simple test or perform it properly if there's really any interest (e.g. larger number of programs, different CPUs, something better than time(1); also my computer was up to 0.05s slower than on Friday :-)) Also, for most "normal" programs, there won't be that much difference between compilers and/or settings.