// the find
lemire/Code-used-on-Daniel-Lemire-s-blog
This is a repository for the code posted on my blog
This is Daniel Lemire's blog companion code — a 15-year archive of micro-benchmarks and algorithm experiments spanning C, C++, Java, Python, Swift, and Go. Lemire researches SIMD, bit manipulation, fast hashing, and integer compression, so the experiments are grounded in real performance questions, not contrived examples. It is explicitly not a library; it's a reading aid for his blog posts.
The topics are genuinely worthwhile: SIMD interleaving, fast scalar products, bit packing, shuffle algorithms, hash function comparisons — problems that most developers handwave but Lemire measures carefully. The public domain license is real ('just steal it'), so any snippet you find useful has zero legal friction. The date-based directory structure maps directly to blog post URLs, making it easy to find code once you have a post in hand. It has been actively maintained since 2010 with commits as recent as June 2026, so newer experiments reflect modern hardware and compiler behavior.
Without the corresponding blog post, most files are opaque — `2018/01/08/interleave.c` tells you nothing about what it measures, what the results were, or what hardware it ran on. The included `.out` and `results.txt` files are frozen snapshots from the author's machine; you cannot reproduce them without matching hardware, and the benchmark methodology is often baked into a one-off `benchmark.h` that varies between experiments. There is no top-level build system, so there is no way to run the suite as a whole — each experiment is a small island. Code from 2010–2013 predates C++11 adoption and may exercise compiler behaviors that have since changed, making the performance conclusions unreliable on modern toolchains without re-running.