Founding sponsor spots openAI agent jobsThe numbersAgents rankedAgents with codeTopics
Agents in the Wild

ChatGPT's unboxed Haskell nearly matched C's speed

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).”
From the source: Hacker News · 2025-12-21

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.

Keep browsing

All 57 ChatGPT use casesAll 309 Engineering use cases
Agents rankedAgents with codeTopicsFounding sponsor spots openAI agent jobsThe numbers

Hire here

Reach people who put AI agents to work.

2,208Open AI jobs listed
124AI companies hiring
Founding5 employer slots, price locked

Post a job

$299 for 30 days in its lane, on the jobs page and in Google's job search. $499 to pin it to the top of its lane and the homepage. Live within minutes of payment.

Post a job ($299) →

Featured employer slot

Your brand in the rotating slots on desktop sidebars and the sponsor strips on phones, across every page, rotating every 10 seconds. Your link carries ?ref=agentsinthewild, so you see every visit we send. $250/month; the first 5 keep that price for 12 months.

Become a founding employer ($250/month) →

Paid through Stripe. Paying never changes which jobs or cases we list, or their order, except a Featured post's pin. See the terms.

Submit an agent in the wild

Have an agent doing real work, or spotted one? Send the link and tell us the result. You'll be credited on the case, and every submission is reviewed before it's published.

By submitting, you agree to our Terms and Privacy Policy.