3 ms·
How much faster than a "naive" scalar implementation is this?
by thechao 7y ago
How much faster than a "naive" scalar implementation is this?
- zwegner 7y agoIt depends on the implementation. A good starting point would be looking at the various implementations benchmarked here: https://github.com/lemire/fastvalidate-utf-8 https://github.com/lemire/fastvalidate-utf-8 It looks like the main naive validator there (validate_utf8) clocks in at 1.25 cycles/byte for ASCII and 11 cycles/byte for UTF-8, which is respectively a 15.8x and 41.5x slowdown from my code.