HN Hall of Fame Weekly email

Popcount CPU instruction

vaibhavsagar.com Essays & writing Essays & articles Hardware & electronics Candidate
Screenshot of vaibhavsagar.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 3 of them.

submissions
4
submitters
4
observed span
2019–2023
peak thread · 162 comments
350 pts
latest 20+ return · 2023-08-13
230 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

.NET Core 3 (in preview, due out Sep 23) includes support for popcount as part of the BitOperations class: https://docs.microsoft.com/en-us/dotnet/api/system.numerics..... There's a recent post describing hardware intrinsics in .NET Core: https://devblogs.microsoft.com/dotnet/hardware-intrinsics-in... There are a lot of potential use cases, but one of the early discussions was around quickly scanning for known HTTP headers. You can see that in use here…

Back in the mid-2000s I worked at a company that made their own (MIPS-based) chips. NSA was one of our customers - supposedly the "defense" who could be considered the good side of NSA compared to the 10x larger "offense" but still. As we were planning for our second generation, they offered quite a bit of money if we'd implement a "sheep and goats" instruction. It would take two operands: an input and a mask. The masked-in bits of the…

On the PS3 SPU cores, the best "does everything" instruction was the single "rotate and mask" series of instructions which was the underlying implementation of all rotates, shifts, and bitfield extraction instructions. That architecture is still my favourite years on - every register was vectorised by default, and the instruction was the minimalistic set to achieve a lot of unusual operations that were incredibly useful for graphics or signal processing work. Often you couldn't find an exact instruction to do…

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
3

100+ points or 50+ comments

Total points
825

reference only — not used in Hall rules or ranking

Total comments
347

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2019-09-09Popcount CPU instructionFirst breakout · Best threadmmastrac350162
2021-06-01The NSA Instruction (2019)lukeh10
2021-06-11The NSA Instruction (2019)cjg24486
2023-08-13You Won’t Believe This One Weird CPU Instruction (2019)Latest 20+ point returnsoftwaredoug23099