3 ms·
You can avoid hard-coding the whitespace symbols and have a generic byte-set search kernel via `vpshufb` AVX512BW-capable CPUs [1] or via `tbl` instructions on
by ashvardanian 1y ago
You can avoid hard-coding the whitespace symbols and have a generic byte-set search kernel via `vpshufb` AVX512BW-capable CPUs [1] or via `tbl` instructions on NEON-capable CPUs [2].
[1]: https://github.com/ashvardanian/StringZilla/blob/2f4b1386ca2ed3c4178c1e4f467a2e78a911f3b2/include/stringzilla/stringzilla.h#L5657-L5769 https://github.com/ashvardanian/StringZilla/blob/2f4b1386ca2...
[2]: https://github.com/ashvardanian/StringZilla/blob/2f4b1386ca2ed3c4178c1e4f467a2e78a911f3b2/include/stringzilla/stringzilla.h#L6282-L6300 https://github.com/ashvardanian/StringZilla/blob/2f4b1386ca2...
- Sesse__ 1y agoYou don't need AVX512BW for shuffle, SSSE3 will do. (Of course, if you want wider registers, you'll need the newer versions such as AVX2 or AVX512, but they don't shuffle cross-lane.)