> From: Hrvoje Niksic <[EMAIL PROTECTED]>
> Date: 08 Apr 2001 23:06:32 +0200
> In the general case (other is* macros), such hacked-up code is
> probably slower than table lookups.
For the special case of isdigit, '0'<=x && x<='9' is usually faster
than table lookups. Decent compilers like GCC optimize that
expression into the equivalent of (x - '0') <= 9u, and subtracting a
constant like '0' is typically faster than table lookup.
> It will still work, because Wget doesn't call setlocale() with
> LC_CTYPE.
Yes, Wget doesn't now (on decent hosts), but I thought it conceivable
that it might in the future. Also, on hosts without LC_MESSAGES, Wget
1.6 invokes setlocale with LC_ALL, which in turn affects LC_CTYPE.
So I thought it safer (as well as faster) for Wget to use '0'<=x && x<='9'.