AlphaDev discovers faster small-sort routines, merged into LLVM’s C++ standard library
Disputed
The takeaway
AlphaDev (Nature, 7 Jun 2023) treated writing assembly as a game and found sort3/sort4/sort5 routines shorter than human versions; they were merged into LLVM libc++.
Status
- Claim
Disputed
- Our reporting
- High confidence
- Verification
- Peer-reviewed
- Importance
- 3 of 5
- Last verified
- 29 September 2026
Your AI and this story
- GPT-6 AstraIn its training data
- Claude Opus 5.5In its training data
- Gemini 4 HydrogenIn its training data
- Grok 4.7In its training data
It happened before the cutoffs of all four assistants, so it can be in their training data.
Key facts
- Sort routines merged into LLVM libc++, used by millions of programs
- DeepMind: up to 70% faster for short sequences, ~1.7% for sequences >250k elements
- Critics: essentially a known sorting network plus one removed mov instruction; Cassio Neri published a shorter, faster sort3 (arXiv 2307.14503)
What happened
AlphaDev found instruction sequences for sorting 3–5 elements that saved instructions over decades-old library code. LLVM maintainers accepted them.
Why it matters
It was AI-discovered code shipping in core infrastructure, though experts argued about how novel the discovery really was.
Sources
3 sources from 3 sites. Numbers match the chips in the text.
3 sources: 2 primary, 1 reaction
Primary
- Faster sorting algorithms discovered using deep reinforcement learning (Nature)nature.com, paper
- DeepMind: AlphaDev discovers faster sorting algorithmsdeepmind.google, official
Reactions
- Cassio Neri: shorter and faster than Sort3AlphaDev (arXiv 2307.14503)arxiv.org, discussion
Changes
- Filed