Tracking down gcc-4.0 performance regressions
Georg Bauhaus
bauhaus@uni-duisburg.de
Mon Jun 6 11:25:00 GMT 2005
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
More information about the Gcc
mailing list