4 ms·
So the classic lookup-tables are faster than switch/case? *c >>= shiftc[len]; could probably be replaced by switch(len) and would result in equal code. My gue
by Too 9y ago
So the classic lookup-tables are faster than switch/case?
*c >>= shiftc[len]; could probably be replaced by switch(len) and would result in equal code.
My guess is that the speed increase comes from the trailing 3 bytes potential overread and the somewhat odd error handling, not the lookups.