From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 22 11:42:59 2012 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0DBE106566C; Sat, 22 Sep 2012 11:42:59 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB8C8FC14; Sat, 22 Sep 2012 11:42:59 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:dd8:3802:af98:bd60] (unknown [IPv6:2001:7b8:3a7:0:dd8:3802:af98:bd60]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DCC155C59; Sat, 22 Sep 2012 13:42:57 +0200 (CEST) Message-ID: <505DA447.40601@andric.com> Date: Sat, 22 Sep 2012 13:43:03 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: "O. Hartmann" References: <505CDE9C.3060504@andric.com> <505D6A51.7090808@zedat.fu-berlin.de> In-Reply-To: <505D6A51.7090808@zedat.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, freebsd-toolchain@FreeBSD.org Subject: Re: More kernel performance tests on FreeBSD 10.0-CURRENT X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 11:42:59 -0000 On 2012-09-22 09:35, O. Hartmann wrote: > Am 09/21/12 23:39, schrieb Dimitry Andric: ... > At least one can say FreeBSD does not suffer from performance drain > using the cutting edge clang 3.2 compared with a gcc 4.2.1 compiler, the > echo from the past. Well, the main idea of these tests is to prove that we will have no regression, or even an improvement in performance, if we make clang 3.2 the default compiler for FreeBSD 10.0, instead of gcc 4.2.1. And that seems to be the case, at least for the kernel. That said, for one of the earlier tests, it seemed that for runtime performance, gcc 4.7.1-compiled programs (in this case clang 3.2 executables) were slightly faster than clang 3.2-compiled ones. In my opinion that result is not bad for such a relatively new compiler, against such a well-established one. :) > Dimirty, are you planning also to benchmark clang 3.2 versus gcc 4.8.0? > From the development point of view, such a benchmark would be more > natural, but I do not know whether the kernel sources are gcc > 4.8-friendly and would allow such a test. The kernel sources are currentely not very friendly to anything but our in-tree gcc and clang. We hacked our version of gcc to recognize several non-standard flags, such as -fformat-extensions, and a few others. We also implemented the -fformat-extensions flag for clang, since our custom printf format specifiers are used throughout the kernel. Ideally, we would remove all these non-standard flags and format specifiers, which would make it possible to compile the kernel with any version of gcc or clang, even external ones installed from ports, or by hand. This is not a trivial task... But maybe I'll take a shot, it would be nice to have at least one comparison against more modern gcc. I can't give any serious ETA, though. :) > What is about optimization level "-O3" and architectural recognition via > "-march=native"? There are only so many things you can test, the possibilities are literally endless! I have already done a few preliminary tests for -march=native, but at least for clang, there seems to be no measureable difference in performance. The tests for gcc are still running. And indeed, -O3 is also a possibility, but again I think the difference will be very marginal, if measurable at all. -Dimitry