29 points · by ashvardanian · 3y ago · 5 comments
The part I enjoyed the most is implementing SIMD behavior without SIMD instructions... Using 64-bit words to work at 8-bit granularity. Unlike conventional SIMD, the code would remain the same for ~~almost~~ any hardware. Let this library be a reminder of how awesome bit-level hacks are! Feel free to use it when working with CommonCrawl or any other sizeable textual dataset.
One random sample:
https://lemire.me/blog/2022/01/21/swar-explained-parsing-eig...
https://en.wikipedia.org/wiki/SWAR
We used this as far back as the eighties on 68000 machines you could do 8 bit SWAR with the 32 bit registers!
Thanks for open-sourcing this project!