P
pembed2012
Dear friends
I have created a more efficient strcmp function. However it only works on
big endian architectures. I would like someone with same to run some
timing tests to see how much is the speed up.
Thank you
int strcmp_fast(char* s,char* t){
uls=(unsigned long*)s;
ult=(unsigned long*)t;
if(*uls>*ult) return(1);
if(*uls<*ult) return(-1);
else return(strcmp(s,t));
}
I have created a more efficient strcmp function. However it only works on
big endian architectures. I would like someone with same to run some
timing tests to see how much is the speed up.
Thank you
int strcmp_fast(char* s,char* t){
uls=(unsigned long*)s;
ult=(unsigned long*)t;
if(*uls>*ult) return(1);
if(*uls<*ult) return(-1);
else return(strcmp(s,t));
}