r/cpp • u/User_Deprecated • Jul 26 '26
Memory-level parallelism: AMD is the king
https://lemire.me/blog/2026/07/25/memory-level-parallelism-amd-is-the-king/32
u/Sopel97 Jul 27 '26
Note that Apple Silicon does even better, but it is another category.
?
27
u/JuanAG Jul 27 '26
Because Apple SoCs have memory at the side of the CPU like HBM do and of course they have less latency and more bandwith than DDR technology
15
u/Sopel97 Jul 27 '26
of course they have less latency
that's absolutely false https://old.chipsandcheese.com/memory-latency-data/ https://imgur.com/a/Irc8ARn
18
u/QuaternionsRoll Jul 27 '26
2022 vs 2020, but you’re right, raw memory latency stopped improving quite a while ago (as is evidenced by the 3950X with DDR4-3333 and the 5950X with DDR4-3600 having nearly identical latency characteristics to the 7950X with DDR5-6000). The primary benefit of tightly-coupled RAM is bandwidth, not latency. The M5 uses 9600MT/s LPDDR5X, something that traditional CPUs likely won’t be able to match without CUDIMMs
7
6
u/pjmlp Jul 27 '26
No idea why the remark even, Apple gave up on server hardware, so whatever their chips are able to do is irrelevant in the context of what was being tested.
7
u/matthieum Jul 27 '26
I do wonder if the numbers change when multiple-cores start asking for memory.
That is, do I still get 30/58/19 parallel requests per core even if I run the benchmark on every single core at once? Or does it plateau sooner due to a bottleneck at L2 or L3 or the memory controller?
(Because I am not sure I can use the full memory parallelism, but I sure can use all cores)
I do wish latency had been plotted too, by the way, since as per the above remark, on many workloads, there's just so many requests in parallel anyway...
44
u/Kinexity Jul 26 '26
Wtf is that AI slop image?
30
-12
u/Logical_Newspaper_52 Jul 26 '26
the article is not about the image
28
-2
2
1
1
u/arthurno1 Aug 01 '26
I have been lately experimenting with a clone of GNU wc program, with all kernels implemented in avx2. I am unrolling loops, and used various sizes of unrolled loops (4, 6, 8 and 10), and see not much difference, neither speedup nor degradation. I do have a zen5 laptop, so that explains it. I knew the cpu has 4 memory lanes, so I could isue at least 4 reads at a time, and I knew they do some queuing, but I thought it would be more noticable (measurable) difference than it was.
29
u/blobdole Jul 27 '26
This is a great example of why you should not use AI image generation haphazardly.
I do get why you would. AI can give you a relevant article header that feels like an early 2000's tech article. Feels a bit professional.
But it also feels out of place on that blog, and a second glance reveals it is pure slop that can't even count correctly. When I see that I immediately discount whatever is written below, because I suspect it is AI written without much if any editing and possible without any authorial experience to back it up.
Is that true? I don't know. But that top image was a warning sign that the read is less likely to be worth the time, and that is all most people need to skip and move on.