This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Performance degradation on g++ 4.6


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)
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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]