Massive performance regression from switching to gcc 4.5
Jan Hubicka
hubicka@ucw.cz
Mon Jun 28 00:05:00 GMT 2010
> > > Jan Hubicka wrote:
> > >>> On Fri, 25 Jun 2010, it was written:
> > >>> There sure is something in 4.5. I've seen a 1-10% slowdown at the GiNaC
> > >>> (a computer algebra library) benchmark suite after switching from 4.4 to
> > >>> 4.5 on x86_64 when compiling with -O2. And there hasn't been a measurable
> > >>> performance differences between 4.3 and 4.4.
> > >>
> > >> FP intensive code could be also affected by:
> > >
> > > This code isn't using floating-point.
> >
> > Hmm, building ginac with current 4.5 branch I get:
> > /bin/sh ../libtool --tag=CXX --mode=compile /abuild/jh/gcc-4.5-nopatch/bin/g++ -DHAVE_CONFIG_H -I. -I../../ginac -I../config -I/usr/local/include -g -O2 -MT function.lo -MD -MP -MF .deps/function.Tpo -c -o function.lo ../../ginac/function.cpp
> > libtool: compile: /abuild/jh/gcc-4.5-nopatch/bin/g++ -DHAVE_CONFIG_H -I. -I../../ginac -I../config -I/usr/local/include -g -O2 -MT function.lo -MD -MP -MF .deps/function.Tpo -c ../../ginac/function.cpp -fPIC -DPIC -o .libs/function.o
> > ../../ginac/function.cpp: In member function âÂÂGiNaC::ex GiNaC::function::power(const GiNaC::ex&) constâÂÂ:
> > ../../ginac/function.cpp:1800:15: error: expected type-specifier
> > ../../ginac/function.cpp:1800:15: error: expected âÂÂ)âÂÂ
> > ../../ginac/function.cpp:1801:72: error: conversion from âÂÂint*â to âÂÂGiNaC::exâ is ambiguous
> > ../../ginac/ex.h:279:1: note: candidates are: GiNaC::ex::ex(long unsigned int) <near match>
> > ../../ginac/ex.h:273:1: note: GiNaC::ex::ex(long int) <near match>
> > ../../ginac/ex.h:267:1: note: GiNaC::ex::ex(unsigned int) <near match>
> > ../../ginac/ex.h:261:1: note: GiNaC::ex::ex(int) <near match>
>
> Hi,
> I got arround by just replacing the offending line by abort() that seems to get me far enough
> to build the testsuite. One thing I noticed is that compile time prolonged excessively to about
> 10 minutes. It seems to be var tracking
>
> 39609 11.3093 cc1plus canonicalize_values_star
> 33469 9.5562 cc1plus loc_cmp
> 22206 6.3403 cc1plus set_slot_part
> 15798 4.5107 cc1plus rtx_equal_p
> 14479 4.1341 cc1plus htab_find_with_hash
> 10461 2.9869 cc1plus htab_find_slot_with_hash
> 7268 2.0752 cc1plus find_loc_in_1pdv
> 6718 1.9181 cc1plus cselib_expand_value_rtx_1
> 6619 1.8899 libc-2.11.1.so strcmp
> 6193 1.7682 cc1plus htab_expand
> 6020 1.7188 cc1plus check_changed_vars_0
> 5797 1.6552 cc1plus htab_traverse_noresize
> 5615 1.6032 cc1plus htab_find_with_hash
> 4757 1.3582 cc1plus vt_expand_loc_callback
> 4529 1.2931 libginac-1.5.so.0.1.2 GiNaC::basic::compare(GiNaC::basic const&) const
> 4497 1.2840 libc-2.11.1.so _int_malloc
> 3879 1.1075 as /usr/bin/as
> 3703 1.0573 cc1plus variable_htab_eq
> 3698 1.0559 cc1plus insert_into_intersection
> 3287 0.9385 cc1plus emit_note_insn_var_location
(it is regression at 4.5 branch, forgot to mention)
Honza
>
> Honza
More information about the Gcc
mailing list