Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2011 22:33:37 +0100
From:      Martin Matuska <mm@FreeBSD.org>
To:        freebsd-current@FreeBSD.org, freebsd-performance@FreeBSD.org
Subject:   FreeBSD Compiler Benchmark: gcc-base vs. gcc-ports vs. clang
Message-ID:  <4D7943B1.1030604@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D7943B1.1030604>