3 ms·
The cache line on x86 is 64 bytes. Your whitespace lookup table is way too big. At the very least, you can subtract (with overflow) '\t' and check that the char
by zamalek 6y ago
The cache line on x86 is 64 bytes. Your whitespace lookup table is way too big. At the very least, you can subtract (with overflow) '\t' and check that the character is not greater than ' ' before hitting the LUT.
The ASCII table is ripe for bit twiddling (I suspect it was organized according with that in mind). You may find bit patterns in whitespace chars.