Yeah this code definitely wasn't designed to win any performance contests. I was mostly optimizing for readability. The easier it is to understand code, the easier it is to audit it from a security perspective.
The author of that blog post admits he doesn't fully understand Lemire's algorithm despite attempting a Rust port of it, and his functions only support a max range of 256 numbers (8 bits), whereas Lemire's version topped out at 64 bits, and the simplistic version I've outlined in this post supports 32 bits.
This isn't a criticism of the post's author of course, because Lemire's algorithm is inherently complex.