A designer's paper sketch of prime numbers became C++ that runs 3.1x faster
It started as a hand-drawn layout for primes by a graphic designer. Gemini and ChatGPT turned it into C++, and the ~3.1x speedup came from cache use, not new math.
Done withGeminiChatGPTSpotted· by HN user amadeapewe· Oct 17, 2026
Result The speedup came from cache, not new math
“The speedup (~3.1x on M1) isn't from new math, but from optimizing how data sits in the cache.”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
They spent time visualizing prime number distributions on paper and found a geometric layout that felt memory-efficient. With help from Gemini and ChatGPT, they translated that idea into a C++ implementation using an 8-pipe wheel packed into a single byte to cut memory traffic.
How it went
The approach produced a real speedup, about 3.1x on an M1 chip, which came from improving cache locality rather than any new algorithm, and they shared it for a sanity check from the systems community.
Try it yourself with Gemini
Sketch out your own idea for a data layout or algorithm on paper first, then describe it in plain language to Gemini or ChatGPT and ask it to translate your idea into working code in your target language. Benchmark the result against a naive baseline to see whether your layout idea actually pays off in practice.
A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.
Building their first AWS project by vibe coding, the writer designed the architecture and let Codex write the code. A flawed first design took a day, against an estimated three or four; the redesign also took a day and scaled.
Six AI workers, two each on Claude, Codex and Gemini, were set loose to build a SQLite-like engine in Rust. It passed 64 queries of a 1,000+ query suite, with slop like redundant buffer copies and no concurrency.
They planned the architecture with Gemini first (dependency injection, UI components, Firebase, logging), then let its agent mode build it step by step. The app works like a charm.
The malware was cleaned out, but a hidden backup in the database, triggered by the WordPress cron, would have brought it back. Gemini pulled the encrypted packages apart and spotted it.
They'd written one by hand years before, so they knew exactly what they wanted. In VS Code's Agent Mode, Gemini built it and refactored it into a Python decorator. One dumb corner case slipped through.
Stuck on a Swift error, they paste it with the surrounding code and ask what's going on. ChatGPT usually gives a solid lead in about half a minute. They still review every line.