This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
performance in sysdeps/powerpc/memset.S
- To: libc-alpha at sources dot redhat dot com
- Subject: performance in sysdeps/powerpc/memset.S
- From: Olaf Hering <olh at suse dot de>
- Date: Thu, 12 Jul 2001 14:33:37 +0200
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...