Hacker News new | ask | show | jobs
by Sopel 18 days ago
if you're interested in a fair comparison here's one https://openbenchmarking.org/test/pts/stockfish
1 comments

Interesting, but seems to lack single-core benchmarks.
So this benchmark lists the following:

> AMD Ryzen 9 9950X 16-Core 63rd 4 40132379 +/- 2530724

> Apple M5 Pro 52nd 5 22108587 +/- 260160

I have absolutely no idea what this is benchmarking or how, but is there any reason not to just read this as the "consumer/low core ryzen" is twice as fast as the m5 pro?

Stockfish parallelizes well and makes heavy use of vector operations, and the Zen5 core has AVX-512 with 4x 512bit° EU per core and 16 cores, while the Apple still only uses 128-bit wide SIMD, with the 6 M5 "Super" cores having 4x128 EUs and the 12 "Performance" cores only having 2x128 EUs.

The M5 Pro is doing shockingly well given the massive disparity in execution resources. But still, it's optimized for web/desktop-like loads, you shouldn't really run heavy number crunching on that CPU.

0: 2x FMA/MUL + 2X ADD

They also mention using SSE/AVX on x86 and NEON on ARM, but there's zero mention of SVE, SME, or AMX which makes me wonder if they aren't compiling with those options (if so, it would be a serious disadvantage).
Apple cores do not implement SVE, SME is not suitable for Stockfish (it is optimized for matrix-matric with large batch size, stockfish is all matrix-vector with batch size of 1), and AMX has the same problem.

You don't get good performance out of this kind of code by just compiling with different options, the compute kernels must be tuned to fit the architecture, and nothing on the M-series but NEON fits the bill.

we've tested x86 AMX when the first Intel CPUs with AMX came out and it was worse. The conclusion was that AMX is not suitable for matrix-vector multiplication, only for matrix-matrix multiplication.

apple's SME/AMX is useless because it's not directly programmable

Is there any sane way to generalize these results?
I don't think so. The workloads are simply too different to generalize.
> I have absolutely no idea what this is benchmarking or how

It's the best chess engine used by millions of people and part of SPEC2026, natively compiled

it's not year 2006 anymore
I’m sorry, I wasn’t aware that Amdahl's law has been cancelled. I will brush up on my computing theory.
Workloads with legitimate serialization dependencies rather than just bad code are pretty rare. Of course, there is still a lot of bad code out there, but it's not Amdahl's law stopping them from doing better.
Amdahl's law prevents great improvements through parallelism only in small problems, e.g. those that can be completed in seconds or minutes.

In big problems, e.g. those whose solution requires hours or days of computation, it is almost always possible to decompose them in enough quasi-independent subproblems that can be executed in parallel, so that you can get an acceleration from parallel execution not much less than the number of available processor cores.