tuhdo.github.io/zen3_vs_m1.org at master · tuhdo/tuhdo.github.io · GitHub
source link: https://github.com/tuhdo/tuhdo.github.io/blob/master/emacs-tutor/zen3_vs_m1.org
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Ryzen 5800X vs Apple M1: Programming-focused benchmarks
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.
Even though the 5800X is compared and seems unfair to the M1, please keep in mind that for single-threaded tasks, a single core doesn’t consume all 95W TDP headroom of the CPU. Based on Anandtech’s analysis, a single 5800X core only consumes 17.3W at 4850 MHz:
Further, a 45W 5900HX is recently spotted, which should deliver around 90% the performance of this 5800X since it could reach at least 4.7 Ghz on boost.
All the test data are here.
Test System
For the M1, in the original article, a Mac Mini M1 was used and all binaries were natively compiled. No Rosetta 2 involved.
- 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.
Java Renaissance (Less is better)
Ryzen 5800x is faster than M1 in most tasks by a large margin.
Java SciMark 2.0 (Higher is better)
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.
Java DaCapo (Less is better)
5800X is mostly faster by a significant margin, except for the H2O benchmark which is more than twice slower.
Python PyPerformance (Less is better)
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.
Go (golang.org/x/benchmarks - Less is better)
The 5800X performs significantly better in all benchmarks, around 30% faster in most benchmarks and some are twice as fast.
Redis
The 5800X performs significantly better in all benchmarks:
JavaScript Web Tooling Benchmark (v8) (Higher is better)
The 5800X is significatnly faster in most benchmarks:
JavaScript Octane 2.0 (Higher is better)
Same story as above:
Bonus: Geekbench5 score on Linux
- 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.
Conclusion
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. If Intel could somehow be successful with their 10nm and 7nm processes, Intel CPUs could still enjoy the same grow and maybe even better. But, a big if, that is. At least AMD got TSMC on their side.
For that reason, x86 is still a formidable opponent for non-x86 ISAs in a forseeable future. I expect the same with Intel CPU, even the up-coming 14nm CPU Rocket Lake to get similar performance to zen 3 despite the obscene power draw.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK