# Squeezing 85.3 GFLOPS from a Single AMD Zen 3 Core with C++ Intrinsics

Original title: 85.3 GFlops: Optimizing FP32 Matrix Multiplication on a Single AMD Zen 3 Core

> Hacker News story 48947739 · language: en · submitted 2026-07-17
> Web version: https://zeli.app/story/48947739
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 91 · by [houslast](<https://news.ycombinator.com/user?id=houslast>) · 💬 22
[original](<https://github.com/houslast3/85.30-GFLOPS-Single-Core-FP32-Matrix-Multiplication-on-AMD-Zen-3>) · [HN discussion](<https://news.ycombinator.com/item?id=48947739>)

## Summary

I systematically tested 28 optimization configurations for FP32 matrix multiplication on a single AMD Zen 3 core using C++ intrinsics. By fine-tuning cache blocking, register usage, and FMA chaining, my best model achieved 85.30 GFLOPS, reaching 63.5% of the theoretical peak and matching performance from libraries like AMD AOCL and OpenBLAS.

## Key quote

> Using non-temporal stores was catastrophic, dropping performance to just 1.24 GFLOPS because the instruction invalidates the cache line on every write.

## HN discussion (22 comments)

### [gitowiec](<https://news.ycombinator.com/item?id=48984357>)

> What's the language? My Firefox detected it as English, I suppose it is because of lang=en in HTML

### [adrian_b](<https://news.ycombinator.com/item?id=48984786>)

> What is interesting here is that this is an optimization study, whose goal was to determine the optimum implementation variant for matrix multiplication on a Zen 3 CPU.
>
> It is likely that a similar optimization strategy would work for a modern Zen 5, though some of the parameters for the optimum variant would probably have double values, because Zen 5 has twice more registers, each double in size, and it can process and transfer a double number of FP32 per clock cycle.
>
> The value given by the author of 63.5% of the theoretical maximum throughput, is likely to be pessimistic, because when doing heavy computations the clock frequency of the CPU will drop, so the actual efficiency might be higher, e.g. perhaps of 70% to 80% of the theoretical maximum throughput at that clock frequency.
>
> The ATLAS BLAS-compatible library attempted to perform automatically such an optimization for its host computer, but I have not studied it to see whether its optimization methods would still work on modern CPUs with AVX+FMA or with AVX-512.

### [ranger_danger](<https://news.ycombinator.com/item?id=48984282>)

> For comparison, the best performing GPUs today can do FP32 at > 100 TFLOP/s

### [Razengan](<https://news.ycombinator.com/item?id=48985150>)

> Could alternative CPU architectures like ternary/quaternary and/or analog etc be better at matrix multiplication?

### [houslast](<https://news.ycombinator.com/item?id=48947740>)

> Pushing the Limits of AMD Zen 3: Achieving 85.3 GFLOPS on a Single Core!  I recently took on the challenge of squeezing every drop of performance out of a single AMD Zen 3 core, successfully reaching a blazing-fast 85.3 GFLOPS in FP32 matrix multiplication. By diving deep into low-level software optimization—focusing on advanced SIMD vectorization, strict cache management, and instruction pipelining—I managed to maximize CPU efficiency without relying on multi-threading. This project serves as a powerful proof of concept for high-performance computing (HPC) enthusiasts, proving that deeply optimized code can still unlock incredible hidden potential in modern silicon.

---

## Cite

- Page: https://zeli.app/story/48947739
- Date: 2026-07-17
- Source: github.com (https://github.com/houslast3/85.30-GFLOPS-Single-Core-FP32-Matrix-Multiplication-on-AMD-Zen-3)
- Hacker News: https://news.ycombinator.com/item?id=48947739

## Other languages

- zh: https://zeli.app/zh/story/48947739 · markdown: https://zeli.app/zh/story/48947739.md
- ja: https://zeli.app/ja/story/48947739 · markdown: https://zeli.app/ja/story/48947739.md
- ko: https://zeli.app/ko/story/48947739 · markdown: https://zeli.app/ko/story/48947739.md
- de: https://zeli.app/de/story/48947739 · markdown: https://zeli.app/de/story/48947739.md
- es: https://zeli.app/es/story/48947739 · markdown: https://zeli.app/es/story/48947739.md
