Daniel Kegel wrote:
So, I'm looking around for other reports of performanceregressions 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
