You Won’t Believe This One Weird CPU Instruction (2019)

In this web content, the author explores the functionality and applications of the “popcount” instruction found in CPU architectures. They explain that popcount counts the number of set bits in a machine word and note that it has been present in CPUs since at least 1961. The author mentions that popcount is also known as “The NSA Instruction” and discusses its use in cryptanalysis. They further highlight its applications in error correction, binary convolutional neural networks, chess programming, molecular fingerprinting, hash array mapped tries, succinct data structures, and compiler optimizations. The author concludes by expressing their fascination with how popcount connects different fields of computing and invites readers to share their favorite unusual CPU instructions.

https://vaibhavsagar.com/blog/2019/09/08/popcount/

To top