[Philip Martin]
> We have svn_ctype_isalpha which is a macro that does a table lookup.
> We don't currently have svn_ctype_isxdigit but it could be added.
> 
> > I'd rather see the whole thing become a single table lookup.  Untested
> > patch appended.
> 
> Is this a bottleneck?  I think using the svn_ctype.h macros should be
> sufficient.

I don't know if it's a bottleneck.  But given that what we actually
want to know if 'what is the value of this hex digit' - using isxdigit,
then isalpha as a conditional, then ASCII arithmetic is awfully
roundabout compared to just a single table lookup.

I mean, the whole point of those ctype functions is to avoid ASCII
arithmetic.  So, while I don't claim my patch will be noticeably faster
(it will be faster but probably not noticeably so), I do claim it's
more elegant.

Peter

Reply via email to