towards a faster isdigit()

Donald Sparkman sparkman at hydra3c.cs.utk.edu
Wed May 15 05:21:25 AEST 1991






As far as a faster isdigit if you can insure only ascii then 

#define isdigit(c) ((c^0x30)<10)

may be faster since its using bitwise Xor instead of cast and subtraction 

Don Sparkman



More information about the Comp.lang.c mailing list