2 ms·
Note that since all of the characters in question are less than 64, you could also do a bit test between (1 << x) and a 64-bit mask, simplifying the control flo
by comex 13y ago
Note that since all of the characters in question are less than 64, you could also do a bit test between (1 << x) and a 64-bit mask, simplifying the control flow; I'm not sure whether this would actually be faster, assuming the post is correct that other characters that happen to be <= '$' are rare in practice, but you could then load several bytes at a time into some SSE registers and do the test in parallel, probably netting a substantial speedup at the cost of becoming architecture dependent.