This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [BusyBox] Re: Long term code compactness regression
Jan Hubicka wrote:
> > I checked this morning, with last week's gcc-3.1 snapshot. A few cases
> > with g77 have slowed down in recent weeks. The worst examples of
> In what testcases g77 slowed down recently?
>
> Honza
Jan, sorry for my pedantry, but I have ready at hand a very short and basic
c++ testcode (reduced from the Haney tests) which today is 2 times (!) slower
than one week ago on i686 (-O2)... Do you have time to look a little bit at
it? Here it is (PR4714 for some more details):
///////////////////////////////////////////////
class RealMatrix {
public:
float &index(int i, int j)
{
return d[i - 1 + n[0] * (j - 1)];
}
float index(int i, int j) const
{
return d[i - 1 + n[0] * (j - 1)];
}
int dim(int i) const { return n[i - 1]; }
private:
float *d;
int n[4];
};
void rmatMul(RealMatrix &t, const RealMatrix &a, const RealMatrix &b)
{
const int M = a.dim(1), N = b.dim(2), K = b.dim(1);
for (int j = 1; j <= N; j++)
{
for (int k = 1; k <= K; k++)
{
float temp = b.index(k, j);
if (temp != 0.0)
{
for (int i = 1; i <= M; i++)
t.index(i, j) += temp * a.index(i, k);
}
}
}
}
/////////////////////////////////////////
Thanks,
Paolo.