TECH Signal 544 2 feeds carried it
CPU memory ordering differences between strong and weak models are smaller than commonly assumed because all CPUs execute optimistically
Illustration only Photo by Yogesh Phuyal on Unsplash
The ryg blog argues that both strongly and weakly ordered CPUs implement memory ordering optimistically, rolling back only on contention, making the scalability gap between x86/SPARC and ARM/RISC-V smaller than commonly believed.
Engineers choosing architectures based on assumed memory-ordering scalability advantages may be overestimating the benefit. The real cost difference lies in metadata tracking overhead and the number of legal orderings under contention, not in a fundamentally different execution approach. The practical advice is to reduce contention rather than optimize for contended access patterns.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
All modern CPUs execute memory accesses optimistically and roll back on contention, regardless of whether their memory model is strong or weak.
Strongly ordered machines keep more metadata per in-flight memory operation and report more conflicts under contention, but the practical performance gap is smaller than commonly assumed.
The author's mantra for multi-threaded code is to contend less, not contend faster, because contention is the slow case everywhere.
THE CLUSTER