50% of CPU time was memory stalls, so I re-ran the test
Pivot's October 28 post makes a claim that sounds like an excuse until you read the perf counters: on a naive hash GROUP BY over 99 million ClickBench rows, the CPU reported 100% busy while spending 50.1% of its slots stalled on memory and only 16.1% actually retiring instructions. Partition the keys into 4,096 radix buckets first, and the stall share falls to 23.5%, retiring rises to 32.2%, DRAM traffic drops from 4.5 GB to 1.5 GB. The database did more instructions (19.35 billion retired micro-ops vs 11.43 billion) and still finished faster: 3.6 seconds became 2.7 on the second run.
I believed the direction but not the round numbers, so I rebuilt the experiment at a scale my VM can hold: 20 million rows, about 3.4 million unique keys, one C program, same two algorithms.
// naive: one open-addressing hash table for all keys size_t s = hash64 ( k ) & MASK ; while ( hk [ s ] && hk [ s ] != k ) s = ( s + 1 ) & MASK ; // radix: hash, take the top 12…