[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#44619: libc6: Really weird stuff - performance loss



Hi,

I know I was talking fiction before telling you that the programs run
slower if libc6-2.1.2 library is installed than libc6-2.1.1, but now I
have a solid ( = simple) proof. I made the following program:

-----------------------------------------
#include <stdio.h>
#include <math.h>

main()
{
  double x,y,z; int i;
  x = y = 1.00000001 ; z = 1.0 ;
  for (i=0;i<300000000;i++) y *= x ;
  printf("Result = %f\n",y);
}
-------------------------------------------

Then I compile it on PII-450MHz:

gcc -O3 -malign-double -o speed speed.c

and do the following:

dpkg -i --force-depends --force-overwrite libc6-2.1.1-13.deb

de7:~/c28a1 $ time speed 
Result = 20.085536

real	0m3.416s
user	0m3.390s
sys	0m0.010s

dpkg -i --force-depends --force-overwrite libc6-2.1.2-5.deb

de7:~/c28a1 $ time speed 
Result = 20.085536

real	0m4.217s
user	0m4.010s
sys	0m0.020s

As you can see this is something easy to check, but I have no fix for
it. I imagine it is due to some changes in the way the library is
compiled or something changed in the library itself.


Reply to: