Apple is making all the rage with the recent M1 SoC released on Mac Mini, MacBook Air and MacBook Pro. Benchmarks were done and amont them, this article attracted my attention as it is focused on programming. It performed various micro-benchmarks on various popular programming languages (no C/C++/Rust though, sadly but that’s fine nevertheles). The data depicted that older x86 CPUs were no match for M1 and it is correct. However, there is one major flaw: the author did not perform benchmarks on Ryzen 5000 series CPUs, yet concluded that x86 CPU is no match for M1. I was curious whether it’s true and decided to run the same sets of benchmarks on my newly AMD Ryzen 5800X.
All the test data are here.
- CPU: Ryzen 5800X (8 cores 16 threads) tuned (Curve Optimizer set to -25)
- RAM: 64 GB DDR4 overclocked to 3733 MHz, stress testing 24 hours stable
- OS: stock ClearLinux 34000 ,
scaling_available_governors
set toperformance
.
Curve Optimizer
is a new way to undervolt Ryzen 5000 CPUs. Settings
to -25, the CPUs can dynamically undervolt from 75 mV - 125 mV depends
on current CPU loads. Because voltage is lower, temperature is lowered
and max boost can sustain longer.
As for RAM, JEDEC defines the maximum frequency is 3200 CL20-22-22 @1.2V. Anything faster is considered overclocked, e.g. 4266 MT/s. So, it’s fine for a bit of RAM OC.
Ryzen 5800x is faster than M1 in most tasks by a large margin.
In the SOR
benchmark, the 5800X is more than twice as fast. For
others, the 5800X is slightly faster, with the exception of Monte
Carlo Integraton
scored 2.7% lower than M1.
5800X is mostly faster by a significant margin, except for the H2O benchmark which is more than twice slower.
In this benchmark, the following benchmarks are ommited as I could not run successfully:
- sqlalchemy_declarative
- sqlalchemy_imperative
- sqlite_synth
Overall, the execution time is roughly the same, with the 5800X slightly faster. Probably a faster Python implementation like PyPy can highlight the differences better.
The 5800X performs significantly better in all benchmarks, around 30% faster in most benchmarks and some are twice as fast.
The 5800X performs significantly better in all benchmarks:
The 5800X is significatnly faster in most benchmarks:
Same story as above:
- Single-core: 1876
- Multi-core: 12339
Link: https://browser.geekbench.com/v5/cpu/5378737
On Windows, the score is 1718 and 11229 respectively: https://browser.geekbench.com/v5/cpu/5350515
So, if a benchmark is available on both Windows and Linux, it is recommended to bench it on Linux for maximizing x86 CPU performance when compared to a CPU with a different architecture.
While M1 is indeed very powerful for its size, when comparing it to the high-end x86 desktop, it is still slower. To conclude that it performs better than the existing x86 CPUs, is a mistake. Zen 3 CPUs are manufactured on 7nm TSMC process with 12nm IO Dies from Global Foundry, so power consumption certainly does take a hit, but is acceptable on a desktop platform where the upper limit could be as high as 300W.
The future Ryzen CPU still got more room to grow with the future 5nm, 3nm and 2nm from TSMC along with CPU architectural changes. For that reason, x86 is still a formidable opponent for non-x86 ISAs in a forseeable future.