Why should code size be 2x larger in SuSE?

Installed SuSE 6.4 Linux PowerPC and first thing, I always write a little trivial code to check performance: #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #define size 1000 int main (void) { int i, j, k; clock_t t1, t2; double value= 0; double *a[size]; printf("Linear Size=%d (%4.2fMbyte):\t", size, (double) size*size*sizeof(double)/1024/1024); for (k=0; k<size; ++k) if ((a[k]= (double *) malloc(size*sizeof(double)))==NULL) return -1; t1= clock(); for (k=0; k<10; ++k) { for (i=0; i<size; ++i) { for (j=0; j<size; ++j) a[i][j]= ++value ; } } t2= clock(); printf ("%12.0fns per op.\n", 1e8*(double) (t2-t1) / CLOCKS_PER_SEC / size / size); return 0; } (sorry- no good netiquette to send code ...) Ran exactly with the same speed as under LinuxPPC. Surprisingly, code size is twice as large: -rwxr-xr-x 1 heinz users 12648 Oct 2 19:48 T -rwxr-xr-x 1 heinz users 6090 Mar 21 2000 Told Why should that be? Heinz

On Fri, Oct 06, Heinz Nabielek wrote:
Ran exactly with the same speed as under LinuxPPC. Surprisingly, code size is twice as large:
-rwxr-xr-x 1 heinz users 12648 Oct 2 19:48 T -rwxr-xr-x 1 heinz users 6090 Mar 21 2000 Told
Why should that be?
Its either stripped per default or they link diffent libs, no idea. olaf@nectarine:~/foo > gcc -Wall -o foo foo.c olaf@nectarine:~/foo > l foo -rwxr-xr-x 1 olaf users 12870 Okt 6 15:54 foo* olaf@nectarine:~/foo > gcc -Wall -o foo2 -s foo.c olaf@nectarine:~/foo > l foo2 -rwxr-xr-x 1 olaf users 3760 Okt 6 15:55 foo2* Gruss Olaf -- $ man clone BUGS Main feature not yet implemented...
participants (2)
-
Heinz Nabielek
-
Olaf Hering