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: Wed, 03 Aug 2011 19:12:00 -0000	[thread overview]
Message-ID: <CAAkRFZLt84YZrMx-Ek4BSOHnGGadToCYeMtv=huh9yrU3tGA7g@mail.gmail.com> (raw)
In-Reply-To: <4E36F3BD.9080804@riverbed.com>

Scanning through the profile data you provided -- test functions such
as test_constant<unsigned short, custom_constant_mutiply<short> ...>
completely disappeared in 4.1's profile which means they are inlined
by gcc4.1. They exist in 4.6's profile. For the unsigned short case
where neither version inlines the call, 4.6 version is much faster.

David

On Mon, Aug 1, 2011 at 11:43 AM, Oleg Smolsky <oleg.smolsky@riverbed.com> wrote:
> On 2011/7/29 14:07, Xinliang David Li wrote:
>>
>> 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.
>
> The test suite has a bunch of very basic C++ tests that are executed an
> enormous number of times. I've built one with the obvious performance
> degradation and attached the source, output and reports.
>
> Here are some highlights:
>    v4.1:    Total absolute time for int8_t constant folding: 30.42 sec
>    v4.6:    Total absolute time for int8_t constant folding: 43.32 sec
>
> Every one of the tests in this section had degraded... the first half more
> than the second. I am not sure how much further I can take this - the
> benchmarked code is very short and plain. I can post disassembly for one
> (some?) of them if anyone is willing to take a look...
>
> Thanks,
> Oleg.
>

  parent reply	other threads:[~2011-08-03 19:12 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
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 [this message]
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='CAAkRFZLt84YZrMx-Ek4BSOHnGGadToCYeMtv=huh9yrU3tGA7g@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).