xoreaxeaxeax/asm-hall-of-shame: Racing to the bottom of CPU performance ·
Instruction latency analysis usually focuses on performance optimization—making code run as fast as possible. The Assembly Hall of Shame takes the opposite approach: searching for the absolute floor of single-instruction performance. Strategy: Use fxrstor64 to load 512-byte FPU/MMX/XMM state from a high-latency MMIO region in the PCIe fabric, then starve the fabric while the load is in flight — a fleet of hammer cores pounds a different high-latency MMIO register with tight 4-byte reads, saturating the PCIe root complex and endpoint with non-posted transactions, so CPU 0's 512-byte fxrstor64 must queue behind all that contending traffic. Contender: AMD Ryzen 7 5800H 🏆 Score: 198,002,498,236 cycles 🏆 Time: 62 seconds A spec-violating unaligned ymm0 load that forced non-posted dword transactions from stalled GPU registers was used to break the fundamental design of System Management Mode in smiiiiiiiiiiiiiiii. Strategy: nop does nothing. It opens the leaderboard accordingly. Contender:
Assembly Hall of Shame Overview Instruction latency analysis usually focuses on performance optimization—making code run as fast as possible. The Assembly Hall of Shame takes the opposite approach: searching for the absolute floor of single-instruction performance. 🏆 Current Champions 🏆 x86: fxrstor64 Strategy: Use fxrstor64 to load 512-byte FPU/MMX/XMM state from a high-latency MMIO region in the PCIe fabric, then starve the fabric while the load is in flight — a fleet of hammer cores pounds a different high-latency MMIO register with tight 4-byte reads, saturating the PCIe root…
saved by
related reading
- What happens when a GPU reads memory | Doublewordblog.doubleword.ai
- GitHub - adam-maj/tiny-gpu: A minimal GPU design in Verilog to learn how GPUs work from the ground up · GitHubgithub.com
- How to Optimize a CUDA Matmul Kernel for cuBLAS-like Performance: a Worklogsiboehm.com
- Your RAM Has a 60 Year Old Design Flaw. I Bypassed It.youtube.com
- ⭐️ Fast LLM Inference From Scratchandrewkchan.dev
- Meta harness makes 10 times better Kimi K3 chipluoluo.ai
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- Look Ma, No Bubbles! Designing a Low-Latency Megakernel for Llama-1B · Hazy Researchhazyresearch.stanford.edu
- research!rsc: Hardware Memory Models (Memory Models, Part 1)research.swtch.com
- Reading privileged memory with a side-channel - Project Zerogoogleprojectzero.blogspot.com
- Zenbleedlock.cmpxchg8b.com
- PiTorch: ML on Baremetal Raspberry Pis | projectsmasonjwang.com