public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xinliang David Li <davidxl@google.com>
To: Oleg Smolsky <oleg.smolsky@riverbed.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Performance degradation on g++ 4.6
Date: Fri, 29 Jul 2011 21:29:00 -0000	[thread overview]
Message-ID: <CAAkRFZ+kOYPhXxGNy-xiujBp-w1sm_7ThrZN51XB+3vUSdxc8Q@mail.gmail.com> (raw)
In-Reply-To: <4E330282.5000303@riverbed.com>

On Fri, Jul 29, 2011 at 11:57 AM, Oleg Smolsky
<oleg.smolsky@riverbed.com> wrote:
> Hey David, here are a couple of answers and notes:
>    - I built the test suite with -O3 and cannot see anything else related to
> inlining that isn't already ON (except for -finline-limit=n which I do not
> how to use)

size estimation, inline heuristics are different between two versions,
so it won't be surprising they make different decisions.

Profiling tools are your best friend here. If you don't have access to
any, the least you can do is to build the program with -pg option and
use gprof tool to find out differences.

David

>    http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
>    - FTO looks like a very different kettle of fish, I'd prefer to leave it
> aside to limit the number of data points (at least for the initial
> investigation)
>    - I've just rerun the suite with -flto and there are no significant
> differences in performance
>
> What else is there?
>
> Oleg.
>
> On 2011/7/29 11:07, Xinliang David Li wrote:
>>
>> My guess is inlining differences. Try more aggressive inline
>> parameters to see if helps. Also try FDO to see there is any
>> performance difference between two versions. You will probably need to
>> do first level triage and file bug reports.
>>
>> David
>>
>>
>> On Fri, Jul 29, 2011 at 10:56 AM, Oleg Smolsky
>> <oleg.smolsky@riverbed.com>  wrote:
>>>
>>> Hi there, I have compiled and run a set of C++ benchmarks on a CentOS4/64
>>> box using the following compilers:
>>>    a) g++4.1 that is available for this distro (GCC version 4.1.2
>>> 20071124
>>> (Red Hat 4.1.2-42)
>>>    b) g++4.6 that I built (stock version 4.6.1)
>>>
>>> The machine has two Intel quad core processors in x86_64 mode
>>> (/proc/cpuinfo
>>> attached)
>>>
>>> Benchmarks were taken from this page:
>>>    http://stlab.adobe.com/performance/
>>>
>>> Results:
>>>    - some of these tests showed 20..30% performance degradation
>>>      (eg the second section in the simple_types_constant_folding test:
>>> 30s
>>> ->  44s)
>>>    - a few were quicker
>>>    - full reports are attached
>>>
>>> I would assume that performance of the generated code is closely
>>> monitored
>>> by the dev community and obvious blunders should not sneak in... However,
>>> my
>>> findings are reproducible with these synthetic benchmarks as well as
>>> production code at work. The latter shows approximately 25% degradation
>>> on
>>> CPU bound tests.
>>>
>>> Is there a trick to building the compiler or using a specific
>>> -mtune/-march
>>> flag for my CPU? I built the compiler with all the default options (it
>>> just
>>> has a distinct installation path):
>>>    ../gcc-%{version}/configure --prefix=/work/tools/gcc46
>>> --enable-languages=c,c++ --with-system-zlib
>>> --with-mpfr=/work/tools/mpfr24
>>> --with-gmp=/work/tools/gmp --with-mpc=/work/tools/mpc
>>>
>>> LD_LIBRARY_PATH=/work/tools/mpfr/lib24:/work/tools/gmp/lib:/work/tools/mpc/lib
>>>
>>> Are there any published benchmarks? I'd appreciate any advice or
>>> pointers.
>>>
>>> Thanks in advance,
>>> Oleg.
>>>
>
>

  reply	other threads:[~2011-07-29 21:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29 18:08 Oleg Smolsky
2011-07-29 18:14 ` Xinliang David Li
2011-07-29 21:08   ` Oleg Smolsky
2011-07-29 21:29     ` Xinliang David Li [this message]
2011-08-01 18:44       ` Oleg Smolsky
2011-08-02  5:48         ` Xinliang David Li
2011-08-23  1:09           ` Oleg Smolsky
2011-08-23  1:34             ` Oleg Smolsky
2011-08-23  1:37               ` Andrew Pinski
2011-08-23 17:47                 ` Oleg Smolsky
2011-08-23 18:38                   ` Xinliang David Li
2011-08-24 19:51                     ` Oleg Smolsky
2011-08-24 20:03                       ` Xinliang David Li
2011-08-24 21:26                         ` Oleg Smolsky
2011-08-24 21:57                           ` Xinliang David Li
2011-08-24 22:14                             ` Oleg Smolsky
2011-08-02  9:27         ` Richard Guenther
2011-08-03 19:12         ` Xinliang David Li
2011-07-30  9:24 ` Richard Guenther
2011-07-30 14:57 Benjamin Redelings I
2011-08-01 18:04 ` Oleg Smolsky
2011-08-01 18:14   ` Marc Glisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAkRFZ+kOYPhXxGNy-xiujBp-w1sm_7ThrZN51XB+3vUSdxc8Q@mail.gmail.com \
    --to=davidxl@google.com \
    --cc=gcc@gcc.gnu.org \
    --cc=oleg.smolsky@riverbed.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).