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: Tracking down gcc-4.0 performance regressions


Daniel Kegel wrote:

So, I'm looking around for other reports of performance
regressions in gcc-4.0.

I came across this one:


int foo(int a, int b)
{
         return a + b;
}

int bar()
{
       int x = 0, y = 10;
       int c;

       for (c=0; c < 123123123 && x > -1; ++c, --y)
               x = foo(c, y);
       return x;
}

int main()
{
       return bar();
}

The for loop is translated rather differently
by GCC 3.4.4 and GCC 4.0.1(pre) on i686 GNU/Linux.
Speed ratio around 85%.

Georg


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