Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-16 Thread Dimitry Andric
On 2012-09-16 07:19, Konstantin Belousov wrote: On Sun, Sep 16, 2012 at 12:34:45AM +0200, Dimitry Andric wrote: ... I tried to map the CPUID into more human-friendly family moniker, and it seems that these are Pentium-4 class CPUs. Am I right ? Yes, it is apparently a Nocona model, this is

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-16 Thread Dimitry Andric
On 2012-09-16 07:25, Garrett Cooper wrote: ... If you can provide the tests, I can rerun it on some Nehalem class workstations I have access to. I unfortunately don't have access to SNB/Romley hardware yet. I did these tests as follows: - Install a recent -CURRENT snapshot on the box (or

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-16 Thread Dominic Fandrey
On 16/09/2012 00:34, Dimitry Andric wrote: ... The executive summary: GENERIC kernels compiled with clang 3.2 are slightly faster than those compiled by gcc 4.2.1, though the difference will not very noticeable in practice. It has been my impression in the past, that math heavy applications

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-15 Thread Luigi Rizzo
On Sun, Sep 16, 2012 at 12:34:45AM +0200, Dimitry Andric wrote: Hi all, By request, I performed a series of kernel performance tests on FreeBSD 10.0-CURRENT, particularly comparing the runtime performance of GENERIC kernels compiled by gcc 4.2.1 and by clang 3.2. the fact that the

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-15 Thread Dimitry Andric
On 2012-09-16 01:22, Luigi Rizzo wrote: ... the fact that the difference is so small is interesting, and it might almost suggests that the test is dominated by other factors than the compiler. Yes, this result was more or less what I expected: runtime performance is probably related more to

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-15 Thread Konstantin Belousov
On Sun, Sep 16, 2012 at 12:34:45AM +0200, Dimitry Andric wrote: Hi all, By request, I performed a series of kernel performance tests on FreeBSD 10.0-CURRENT, particularly comparing the runtime performance of GENERIC kernels compiled by gcc 4.2.1 and by clang 3.2. The attached text file[1]

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-15 Thread Garrett Cooper
On Sat, Sep 15, 2012 at 10:19 PM, Konstantin Belousov kostik...@gmail.com wrote: On Sun, Sep 16, 2012 at 12:34:45AM +0200, Dimitry Andric wrote: Hi all, By request, I performed a series of kernel performance tests on FreeBSD 10.0-CURRENT, particularly comparing the runtime performance of

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-06 Thread Roman Divacky
On Wed, Sep 05, 2012 at 03:13:11PM -0700, Steve Kargl wrote: On Wed, Sep 05, 2012 at 11:31:26AM +0200, Dimitry Andric wrote: On 2012-09-05 01:40, Garrett Cooper wrote: ... Steve does have a point. Posting the results of CFLAGS/CPPFLAGS/LDFLAGS/etc for config.log (and maybe poking

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-06 Thread David Chisnall
On 6 Sep 2012, at 09:43, Roman Divacky wrote: Was this compiled as amd64 or i386? Also, can you send me the test case? So that we can explore the difference. The working theory now is SSE vs FPU mathematics, but it would be nice to see the testcase. There may also be a difference in whether

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-06 Thread Dimitry Andric
On 2012-09-06 12:20, David Chisnall wrote: ... There may also be a difference in whether -ffast-math is the default on each compiler. On x86, this will replace a number of libm calls with (much faster, but less accurate) SSE or x87 instructions. If this is enabled by default with clang and

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-06 Thread Steve Kargl
On Thu, Sep 06, 2012 at 10:43:12AM +0200, Roman Divacky wrote: On Wed, Sep 05, 2012 at 03:13:11PM -0700, Steve Kargl wrote: Compiling libm on CPU: AMD Opteron(tm) Processor 248 (2192.01-MHz K8-class CPU) Origin = AuthenticAMD Id = 0xf5a Family = f Model = 5 Stepping = 10

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Dimitry Andric
On 2012-09-05 01:40, Garrett Cooper wrote: ... Steve does have a point. Posting the results of CFLAGS/CPPFLAGS/LDFLAGS/etc for config.log (and maybe poking through the code to figure out what *FLAGS were used elsewhere) is more valuable than the data is in its current state (unfortunately..

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread David Chisnall
On 5 Sep 2012, at 10:31, Dimitry Andric wrote: These are just the default FreeBSD optimization flags for building clang, which are probably used by the majority of users out there. This is the case that I was interested in particularly. The -fno-strict-aliasing is not really my

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Dimitry Andric
On 2012-09-05 11:36, David Chisnall wrote: On 5 Sep 2012, at 10:31, Dimitry Andric wrote: TThe -fno-strict-aliasing is not really my choice, but it was introduced in the past by Nathan Whitehorn, who apparently saw problems without it. It will hopefully disappear in the future.

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Justin Hibbits
On Wed, Sep 5, 2012 at 6:56 AM, Dimitry Andric dimi...@andric.com wrote: On 2012-09-05 11:36, David Chisnall wrote: On 5 Sep 2012, at 10:31, Dimitry Andric wrote: TThe -fno-strict-aliasing is not really my choice, but it was introduced in the past by Nathan Whitehorn, who

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Roman Divacky
What makes you think it's a bug in llvm code and not a plain gcc miscompile? Other people seem to compile llvm on PPC64 with gcc and -fstrict-aliasing just fine. They just dont happen to use gcc4.2.1. Ie. gcc47 is reported to not have this problem. I personally can confirm that fbsd+gcc48 is ok to

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Justin Hibbits
Actually, Nathan does say it's gcc's fault in a comment on that bug. However, I do all my clang work compiling it with gcc4.2.1, so run into this constantly when I forget to add the flag. - Justin On Wed, Sep 5, 2012 at 1:37 PM, Roman Divacky rdiva...@freebsd.org wrote: What makes you think

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Roman Divacky
I've been compiling clang with itself on PPC64 for a while now. Works quite good :) On Wed, Sep 05, 2012 at 01:44:00PM -0400, Justin Hibbits wrote: Actually, Nathan does say it's gcc's fault in a comment on that bug. However, I do all my clang work compiling it with gcc4.2.1, so run into this

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-05 Thread Steve Kargl
On Wed, Sep 05, 2012 at 11:31:26AM +0200, Dimitry Andric wrote: On 2012-09-05 01:40, Garrett Cooper wrote: ... Steve does have a point. Posting the results of CFLAGS/CPPFLAGS/LDFLAGS/etc for config.log (and maybe poking through the code to figure out what *FLAGS were used elsewhere) is

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-04 Thread O. Hartmann
On 09/04/12 22:39, Dimitry Andric wrote: Hi all, I recently performed a series of compiler performance tests on FreeBSD 10.0-CURRENT, particularly comparing gcc 4.2.1 and gcc 4.7.1 against clang 3.1 and clang 3.2. The attached text file[1] contains more information about the tests, some

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-04 Thread Steve Kargl
On Tue, Sep 04, 2012 at 10:39:40PM +0200, Dimitry Andric wrote: I recently performed a series of compiler performance tests on FreeBSD 10.0-CURRENT, particularly comparing gcc 4.2.1 and gcc 4.7.1 against clang 3.1 and clang 3.2. The attached text file[1] contains more information about the

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-04 Thread Garrett Cooper
On Tue, Sep 4, 2012 at 1:39 PM, Dimitry Andric dimi...@andric.com wrote: Hi all, I recently performed a series of compiler performance tests on FreeBSD 10.0-CURRENT, particularly comparing gcc 4.2.1 and gcc 4.7.1 against clang 3.1 and clang 3.2. The attached text file[1] contains more

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-04 Thread Dimitry Andric
On 2012-09-04 23:43, Steve Kargl wrote: On Tue, Sep 04, 2012 at 10:39:40PM +0200, Dimitry Andric wrote: I recently performed a series of compiler performance tests on FreeBSD 10.0-CURRENT, particularly comparing gcc 4.2.1 and gcc 4.7.1 against clang 3.1 and clang 3.2. ... The benchmark is

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-04 Thread Steve Kargl
On Tue, Sep 04, 2012 at 11:59:39PM +0200, Dimitry Andric wrote: On 2012-09-04 23:43, Steve Kargl wrote: On Tue, Sep 04, 2012 at 10:39:40PM +0200, Dimitry Andric wrote: I recently performed a series of compiler performance tests on FreeBSD 10.0-CURRENT, particularly comparing gcc 4.2.1 and gcc

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-04 Thread Garrett Cooper
On Tue, Sep 4, 2012 at 3:14 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote: On Tue, Sep 04, 2012 at 11:59:39PM +0200, Dimitry Andric wrote: On 2012-09-04 23:43, Steve Kargl wrote: On Tue, Sep 04, 2012 at 10:39:40PM +0200, Dimitry Andric wrote: I recently performed a series of compiler