Pivot Lake's "Memory Latency, Stupid" post on GROUP BY hits HN front page
A technical breakdown of why 100%-CPU databases are often memory-bound, using a GROUP BY benchmark, gains traction across HN, Reddit and Mastodon.
What to know
- The post argues that 100% CPU utilization can mask the fact that a CPU is idle while waiting on slow memory accesses rather than doing useful work.
- A naive GROUP BY over 99 million rows with ~17 million unique keys takes 3.9 seconds on a single core because nearly every hash-table lookup misses CPU caches and hits RAM.
- The same article circulated for three days with little attention before a later Hacker News submission broke through to the front page with 101 points and 32 comments.
Pivot Lake Database engine vendor and blog author
How it unfolded 5 developments, newest first · click a bar or a number to jump articlesposts
-
5
Post is shared on Mastodon
An automated Mastodon account linking to Hacker News discussions reposts the article and its HN comment thread.
-
Modern CPUs have hundreds of megabytes of cache. That's more than the entire hard disk space required by Windows in the 1990s.You could install an entire Windows system, emulated in cache of a modern CPU, including the hard disk, and modern computers are still slow, partly because the CPU does nothing while waiting for RAM to fetch data, and…
2 more of the top 3 · 12 posts in this stretch
-
H
It's the Memory Latency, Stupid Link: https:// pivotlake.io/blog/its-the-memo ry-latency-stupid/ Discussion: https:// news.ycombinator.com/item?id=5 0318720
-
Hi, i just have 2 questions. Are your machines priorizing Space over Processing ? In terms to save a few bytes, cos "Rendering" (for example) is done by the clients machine as an example? Or have i missunderstood something? I am asking, cos the first answer in the posting seem to miss: "commenting the code good enough than anyone may 'understood…
-
-
4
Post breaks through to HN front page
A third Hacker News submission of the same article gains significant traction, reaching 101 points and 32 comments, and is also picked up by the HN Frontpage RSS feed.
“This takes... a whopping 3.9 seconds.”
— pivotlake.io blog post -
I work with another team at work that uses lots of message passing, C++ virtual methods in deeply nested class hierarchies, large DOMs and off-the-shelf C++ STL containers... on a STM32MP1, which has an in-order Cortex-A7 and a pittance of cache.On the other hand, in my team I wrote my custom C++ STL containers that allocate inline, SAX-style…
2 more of the top 3 · 3 posts in this stretch
-
I’ve had code review pushback against reorganizing data structures to be more cache-friendly on the grounds that it was “premature optimization” even though I pre-emotively justified the decision with benchmark results indicating that the performance difference was large and business relevant, and addressed a real performance bottleneck that I…
-
I work in the games industry with exceptionally skilled system programmers that can do that too. They're getting on in age, and there's fewer programmers in the younger generations that are interested in any of it. Technology is sadly increasingly homogenising around Unreal Engine 5
-
-
3
Post resubmitted to HN under a new title
The identical article is resubmitted to Hacker News as "Making GROUP BY faster by doing more (CPU) work," again with minimal traction.
-
2
Post is cross-posted to Reddit
The same article is shared on Reddit shortly after its first Hacker News appearance, drawing no measurable engagement.
-
1
Pivot Lake publishes memory-latency explainer on GROUP BY performance
The post explains CPU cache hierarchy and memory access latency, then benchmarks a naive single-core GROUP BY over 99 million rows with ~17 million unique keys, taking 3.9 seconds. It is first submitted to Hacker News with little initial traction.
-
2 outlets It's the memory latency, stupid
first by HN Best, 12d ago · also HN Frontpage
-
What people are saying 9 voices from 2 sites · best of 15 · verbatim
- Nov 1
-
Clean code is beautiful, like a convenient lie enjoys us. Cache aware code is ugly, like a truth that hurts. Morality suggests to be honest from the beginning, there is no prematurity in aiming for cache locality.
-
This blog post and some other pages in the website are really great. Just useful information without padding, even when writing about the product.
-
N
It's the memory latency, stupid: https:// pivotlake.io/blog/its-the-memo ry-latency-stupid/ Discussion: http:// news.ycombinator.com/item?id=5 0318720
-
I remember have a very long argument with a team I worked on, who were mostly convinced our service couldn't handle requests any faster because the CPUs were already at 100%. In the end we tripled the requests-per-second by cleaning up the service's memory access patterns...
- Oct 31
-
Someone asked me why Zig programmers seem to genuinely enjoy passing the allocator around as an argument. I didn’t have a good answer at the time, but I think I do now, thanks to your comment - feeling the “weight” of allocations is an example of mechanical sympathy, and having to pass around and use an allocator explicitly makes your code-effort…
-
Uh, isn't this just radix-partitioned aggregation? Hierarchical (fixed two level) aggregation is old. What's novel here?Microcosm of Pivot itself I guess. I just don't get why this project exists when DuckDB and Clickhouse both exist.
-
I recently spent three weeks paring down a piece of software until it could run entirely in the L1 cache of the processor it was running on. The performance was - to put it mildly - impressive. And this was 1970's technology running on a modern CPU. This stuff can do miracles if you use it right.
-
I feel like the solution presented is just a clustered hashmap or “locality sensitive” if you’d like it.Still not orders of magnitude better.
-
https://people.freebsd.org/~lstewart/articles/cpumemory.pdfHas anyone rewritten this for 2026?