From owner-freebsd-amd64@FreeBSD.ORG Thu May 26 00:13:47 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99A8716A41C for ; Thu, 26 May 2005 00:13:47 +0000 (GMT) (envelope-from mv@roq.com) Received: from p4.roq.com (ns1.ecoms.com [207.44.130.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5148943D54 for ; Thu, 26 May 2005 00:13:45 +0000 (GMT) (envelope-from mv@roq.com) Received: from p4.roq.com (localhost.roq.com [127.0.0.1]) by p4.roq.com (Postfix) with ESMTP id A5C8E4CFF4; Thu, 26 May 2005 00:14:04 +0000 (GMT) Received: from [192.168.46.52] (ppp166-27.static.internode.on.net [150.101.166.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by p4.roq.com (Postfix) with ESMTP id A9A934CEC5; Thu, 26 May 2005 00:14:03 +0000 (GMT) Message-ID: <429514AF.5000306@roq.com> Date: Thu, 26 May 2005 10:13:35 +1000 From: Michael VInce User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.8) Gecko/20050524 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nicolas Blais References: <200505251317.22128.nb_root@videotron.ca> In-Reply-To: <200505251317.22128.nb_root@videotron.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-amd64@freebsd.org Subject: Re: amd64 optimized gcc? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 00:13:47 -0000 Interesting. I have been playing with GCC optimizations my self latterly and have been wondering how much it helps, haven't done any benchmarks though. I some times wonder if the GCC people are doing good working with optimization flags. I recently lost my hard drive on my ASUS A4K (AMD64) laptop, so bought a new 16meg cache 80gig Toshiba hard drive for it, while I wait for warranty to come through on my old one. I did a buildworld under 'CPUTYPE=athlon64' in make.conf and 'CFLAGS= -O2 -pipe -funroll-loops' for the the kernel. I also used both to build all my ports including xorg and KDE. All this combined has made my laptop feel a lot faster. After I load up openoffice2 (via Linux emu) once I can fully reopen a xls file in about 1.5 seconds, I believe the HD cache must be playing a bit part in that. Mike Nicolas Blais wrote: >I am developping a software that follows a random()-dependant algorithm which >is extremely cpu intensif. >I decided to run on different platforms to see how it performed based on cpu >and os (in a way of benchmarking) and I'm surprised by the numbers: > >Reference times for benchmark (5e+07 run of the algorithm): > >(FreeBSD/i386) Venice (S939, 512K L2 cache) Athlon64 3000 overclocked @ 2655 >Mhz : 78.3072 s (638511 r/s) > Note: Cool 'n' Quiet! Disabled in BIOS. > Note: 1 G RAM > >(FreeBSD/amd64) Venice (S939, 512K L2 cache) Athlon64 3000 overclocked @ 2655 >Mhz : 71.2521 s (701732 r/s) > Note: Cool 'n' Quiet! Disabled in BIOS. > Note: 1 G RAM > >(Knoppix/i386) Clawhammer (S747, 1MB L2 cache) Athlon64 3200 @ 2000 Mhz : >133.858 s (373325 r/s) > Note: Compaq R3240CA Laptop, Cool 'n' Quiet! forced by BIOS. > Note: 512 M RAM > >(FreeBSD/amd64) Clawhammer (S747, 1MB L2 cache) Athlon64 3200 @ 2000 Mhz : >47.2754 s (1057630 r/s) > Note: Compaq R3240CA Laptop, Cool 'n' Quiet! forced by BIOS. > sysctl hw.acpi.cpu.px_control=-1 > Note: 512 M RAM > >(FreeBSD/i386) Pentium II @ 233 Mhz : 538.136 s (92913.3 r/s) > Note: 192 M RAM > >Not surprising is the Pentium II :). What is surprising is that amd64 FreeBSD >seems to execute code faster than i386 FreeBSD, so I'm wondering if gcc >(amd64) really optimizes code for the cpu. If it is, I would probably move my >httpd server to amd64... > >Also, maybe less surprising is that Knoppix sucks running the algorithm for >some reason and that L2 cache really is a big factor (my Laptop outperforms >my heavily overclocked box). > >Any comments? > >