This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Performance degradation on g++ 4.6
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Oleg Smolsky <oleg dot smolsky at riverbed dot com>
- Cc: Xinliang David Li <davidxl at google dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 2 Aug 2011 11:27:16 +0200
- Subject: Re: Performance degradation on g++ 4.6
- References: <4E32F44F.7090201@riverbed.com> <CAAkRFZJPrLYdoKwnsH-L-AVPcJb8Wiq26f17zQFt2qoBkKUkGw@mail.gmail.com> <4E330282.5000303@riverbed.com> <CAAkRFZ+kOYPhXxGNy-xiujBp-w1sm_7ThrZN51XB+3vUSdxc8Q@mail.gmail.com> <4E36F3BD.9080804@riverbed.com>
On Mon, Aug 1, 2011 at 8:43 PM, 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...
I have a hard time actually seeing what expressions they try to fold
(argh, templates everywhere ...). One thing that changed between
4.1 and 4.6 is that we can no longer re-associate freely signed integers
because of undefined overflow concerns - which is a correctness issue.
Depending on the way the tests are written the folding in 4.1 was
probably a bug.
Richard.
> Thanks,
> Oleg.
>