On 3/21/25 08:33, Bruno Haible wrote:
Regarding speed, I'm not sure: the byte describing the properties
of *str is in the L1 cache after the execution of
   isspace ((unsigned char) *str)

Oh, and I just checked with gcc -O2 on x86-64, which optimizes the isdigit version into a fewer bytes' worth of insns. It seems the GCC folks have spent some time optimizing ctype.h-related calls; the *str == '-' || *str == '+' code wasn't optimized nearly as well.

Sorry about the noise; I was just noodling.

Reply via email to