How to make a single CPU instruction take 62 seconds

How to make a single CPU instruction take 62 seconds

Most developers benchmark code to make it run faster; this repository does the exact opposite.

A new open-source project called Assembly Hall of Shame is cataloging the most bizarrely slow x86 assembly code ever written. Created by developer xoreaxeaxeax, the repository sets strict rules to see how many CPU cycles a single instruction can burn on factory stock hardware. The current record holder is a 512-byte state restore instruction called fxrstor64 on an AMD Ryzen 7 5800H. It burned 198 billion cycles—taking 62 full seconds to execute.

Why it matters: Modern CPUs usually run billions of instructions every second. Showing how to stall a single core for over a minute reveals the wild performance traps hidden inside memory-mapped IO and system buses.

Here's the gist of the winning strategy: CPU 0 tries to load state from a high-latency hardware region while a fleet of "hammer" cores continuously pounds the bus with competing traffic, forcing the initial instruction to sit in queue.

If your code feels slow today, at least it isn't waiting a minute for one instruction to retire.

Sources