Just for fun, I ported and hacked together a self-contained Nim version of Daniel Lemire's avxcount: [https://gist.github.com/aboisvert/3f89bc0ae0a2168fcf35ccca98177f6a](https://gist.github.com/aboisvert/3f89bc0ae0a2168fcf35ccca98177f6a)
(I didn't bother with the loop-unrolled versions)