This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

performance in sysdeps/powerpc/memset.S


Hi,

there are some problems with current sysdeps/powerpc/memset.S.
It prevents booting a POWER3 machine, and it also slows down memset(). 

#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#define my_size 100
char a,b;
int i = my_size;

int main (void) {
        char *p;
        while(i--) {
                printf("%x\n",i);
        while(++a) {
                while(--b) {
                        p = malloc(i*i);
                        if(p == NULL) {
                                printf("a %x b %x\n",a,b);
                                return 1;
                        } 
                        memset(p,b,(i*i));
                        memset(p,a,(i*i));
                        memset(p,b,(i*i));
                        memset(p,a,(i*i));
                        memset(p,b,(i*i));
                        memset(p,a,(i*i));
                        memset(p,b,(i*i));
                        memset(p,a,(i*i));
                        free(p);
                }

        }}
return 0;
}


604: without it: 2:22, with it: 2:47    kernel 2.4.6-pre3
G3: without it: 2:06, with it: 3:55     kernel 2.4.6
G4: without it: 2:22, without it: 3:55  kernel 2.4.2

The test was done with glibc 2.2 as shipped with SuSE 7.1-ppc.

Is there a good reason to provide a memset.S? This testcase at least
shows a real slowdown.


Gruss Olaf

-- 
 $ man clone

BUGS
       Main feature not yet implemented...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]