From owner-freebsd-current@FreeBSD.ORG Thu Mar 10 21:33:40 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91405106564A; Thu, 10 Mar 2011 21:33:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:100:1043::3]) by mx1.freebsd.org (Postfix) with ESMTP id 297FA8FC1B; Thu, 10 Mar 2011 21:33:40 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 5564013AC60; Thu, 10 Mar 2011 22:33:39 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 72FWt1ymc4Ci; Thu, 10 Mar 2011 22:33:37 +0100 (CET) Received: from [10.9.8.1] (chello085216231078.chello.sk [85.216.231.78]) by mail.vx.sk (Postfix) with ESMTPSA id 0109113AC58; Thu, 10 Mar 2011 22:33:36 +0100 (CET) Message-ID: <4D7943B1.1030604@FreeBSD.org> Date: Thu, 10 Mar 2011 22:33:37 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org, freebsd-performance@FreeBSD.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 7bit Cc: Subject: FreeBSD Compiler Benchmark: gcc-base vs. gcc-ports vs. clang 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: Thu, 10 Mar 2011 21:33:40 -0000 Hi everyone, we have performed a benchmark of the perl binary compiled with base gcc, ports gcc and ports clang using the perlbench benchmark suite. Our benchmark was performed solely on amd64 with 10 different processors and we have tried different -march= flags to compare binary performance of the same compiler with different flags. Here is some statistics from the results: - clang falls 10% behind the base gcc 4.2.1 (test average) - gcc 4.5 from ports gives 5-10% better average performance than the base gcc 4.2.1 - 4% average penalty for Intel Atom and -march=nocona (using gcc from base) - core i7 class processors run best with -march=nocona (using gcc from base) This benchmark speaks only for perl, but it tests quite a lot of "generic" features so we a are seriously considering using ports gcc for heavily used ports (e.g. PHP, MySQL, PostgreSQL) and suggesting that an user should be provided with a easily settable choice of using gcc 4.5 for ports. A first step in this direction is in this PR (allowing build-only dependency on GCC): http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/155408 More information, detailed test results and test configuration are at our blog: http://blog.vx.sk/archives/25-FreeBSD-Compiler-Benchmark-gcc-base-vs-gcc-ports-vs-clang.html