Comparing language speeds on the Leibniz formula for pi, they had ChatGPT rewrite the benchmark's Haskell to use unboxed numeric types, which they'd never used. It ran in 1.5 seconds, close to C's 1.27.
Done withChatGPTSpotted· by HN user Hizonner· Nov 6, 2026
Result Down from 4.75 seconds with -O3 on their old machine
“I had ChatGPT rewrite the Haskell code to use unboxed numeric types. It ran in 1.5 seconds (the C version takes 1.27).”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
In a thread on a programming language speed comparison using the Leibniz formula for pi, they took the benchmark’s Haskell implementation and had ChatGPT rewrite it to use unboxed numeric types. They’d never used unboxed types, which you could argue aren’t common idiom, though they say anyone who regularly writes numerical Haskell would use them. The rewrite mostly sprinkles ‘#’ through the code, plus a few specialized functions.
How it went
Compiled with -O3 on their old machine, the original ran in 4.75 seconds; the ChatGPT rewrite ran in 1.5 seconds, against 1.27 for the C version. That leaves them asking which one is the right time.
Try it yourself with ChatGPT
Here is my [Haskell] implementation of [a numeric algorithm]. Rewrite it to use unboxed numeric types so it runs faster, even though I've never used unboxed types myself. Explain the specialized functions you introduce, then show me the diff before I benchmark it.
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.
RabbitMQ's docs were limited on how the pieces wire together. ChatGPT gave a fair amount of starter code; they used some of it, added to it by hand, and that's what runs in production.
A tag-based file recommender kept missing the mark with Claude. ChatGPT turned the problem into one precise paragraph. Handed back to Claude, it clicked, and a working solution came out without any drama.
A SQLAlchemy model with roughly known fields, and no wish to name them or look up the type syntax. ChatGPT wrote it in seconds, a job the writer says would have taken at least ten minutes otherwise.
A 2D pixel game, stage by stage: ChatGPT's speech to text turned spoken ideas into prompts for Claude Code with Opus 5.5. After the first stage, it usually one-shotted 95%, and the writer tweaked the rest.
A vibe-coded video pipeline locked up once wired to Arduino hardware, and Claude Code spent more than 3 hours on rewrites. Told to research the problem on the web, it delivered the right code 30 seconds later.
A fairly large app had taken over two years to write. Working alone since February with ChatGPT, the writer rewrote its backend and frontend and just submitted it for review, checking every step themselves.