In this content, the author discusses how processors can use SIMD instructions to process 16 bytes at once and accelerate tasks like parsing HTML or JSON. The author highlights the simdjson parser’s success in utilizing SIMD instructions to achieve fast results, with Google Chrome’s engine adopting this approach. The author provides code examples for implementing SIMD parsing in ARM and Intel/AMD processors, as well as a vectorized classification technique. A benchmark comparison shows that the simplest vectorized classification method performs the best. The author concludes that even a basic SIMD approach can yield fast results and suggests that older SSE2 PCs can still benefit from this technique.
https://lemire.me/blog/2024/06/08/scan-html-faster-with-simd-instructions-chrome-edition/