
Quickly identifying a sequence of digits in a string of characters - ingve
https://lemire.me/blog/2018/09/30/quickly-identifying-a-sequence-of-digits-in-a-string-of-characters/
======
BeeOnRope
SWAR approaches are pretty awesome. They are the poor man's SIMD, and are even
useful in combination with SIMD: especially on GPU where you often don't have
byte or 16-bit operations in the first place: you can "roll your own" with
SWAR rather than just extending every element to 32-bits.

I recommend the classic bithacks page:
[https://graphics.stanford.edu/~seander/bithacks.html](https://graphics.stanford.edu/~seander/bithacks.html)
as a good source, once you work your way through a few of these examples the
basic approaches (using carries to check multiple bits, using multiplications
as broadcasts, using shits as mini-lookup tables, etc) become clear.

