<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic" -->

---
title: Memory ordering in CPUs | daily.dev
description: Common claims that weakly ordered architectures like ARM or RISC-V are inherently more scalable than strongly ordered ones like x86 or SPARC rest on a...
canonical: https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Memory ordering in CPUs | daily.dev
og:description: Common claims that weakly ordered architectures like ARM or RISC-V are inherently more scalable than strongly ordered ones like x86 or SPARC rest on a...
og:url: https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic
og:image: https://api.daily.dev/og/posts/YNHh3zOic.png
og:image:alt: Memory ordering in CPUs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory ordering in CPUs

**[Ryg blog](https://daily.dev/sources/fgiesen)** · 7 min read · 0 upvotes · 0 comments

## Summary

Common claims that weakly ordered architectures like ARM or RISC-V are inherently more scalable than strongly ordered ones like x86 or SPARC rest on a misconception: no CPU actually obeys its memory model for every access. Instead, CPUs implement memory ordering optimistically, speculating that most loads and stores are uncontended, and only fall back to strict ordering guarantees when contention is detected, triggering rollback and retry. The real difference between strong and weak memory models is how much metadata must be tracked to detect ordering violations, not whether operations execute strictly in order. Empirically, many-core systems on both ARM and x86 show similar scaling challenges around contention and NUMA, undermining the notion that weak ordering provides a decisive scalability advantage. Apple Silicon's optional hardware TSO mode (used for Rosetta x86 emulation) shows roughly a 7% performance cost, but this number is specific to that ARM-tuned implementation and doesn't generalize.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://fgiesen.wordpress.com/2026/08/25/memory-ordering-in-cpus>

## Questions this post answers

### Do CPUs actually follow their memory model rules for every single memory access?

No, most CPUs only promise to behave as if they followed the rules. They implement memory ordering optimistically, assuming most loads and stores are uncontended, and execute out of order accordingly. Only when contention is detected between the time an instruction executes and commits does the CPU roll back and retry to enforce correct ordering. Exceptions are tiny in-order microcontrollers, often without caches, which follow the rules literally but slowly.

_daily.dev surfaces deep architecture explainers like this for engineers reasoning about concurrency performance._

### What is the measured performance cost of hardware TSO mode on Apple Silicon?

Apple Silicon's optional hardware TSO mode, used to support Rosetta x86 emulation, is often quoted as costing around 7% performance versus its native relaxed ARM mode. This figure is specific to that implementation since Apple Silicon cores are tuned for typical AArch64 workloads with mostly relaxed loads/stores, not optimized for TSO, so it should not be generalized to other architectures.

_Engineers weighing x86 versus ARM performance trade-offs can track findings like this on daily.dev._

### Why don't weakly ordered CPUs like ARM show a clear scalability advantage over strongly ordered CPUs like x86 in many-core systems?

Because contention, not raw memory model strictness, is the actual bottleneck in practice. Server systems with hundreds of cores in both ARM and x86 varieties show similar characteristics: good performance on shared-nothing workloads, finicky NUMA setups, and severe slowdowns at contention choke points, suggesting the weak-versus-strong distinction matters far less than vendor-specific microarchitecture differences.

_daily.dev helps engineers comparing many-core ARM and x86 systems keep up with architecture research like this._

## Community take

How the wider developer community reacted, aggregated from 4 discussions and 15 comments across lobsters, hackernews (as of 2026-08-27).

**TL;DR:** Commenters largely engage constructively with the article's claim that weak vs strong memory models differ mainly in metadata/rollback cost, citing real benchmarks of Apple's TSO mode that show a bigger hit (3%+) than the article's 7% figure suggests in some cases, while others push back that the contended/critical-path case still matters a lot.

**Sentiment:** 15% positive · 55% mixed · 30% skeptical

**The case for**

- Real-world benchmarking of Apple's runtime-configurable TSO mode confirms the chips handle both memory models reasonably well.
- The explicit memory-order APIs in C++/Rust let developers choose ordering only where it truly matters, which some see as validating the article's framing.

**The pushback**

- Independent studies found the TSO overhead is not purely an artifact but has a fundamental cost of at least 3%, plus unmeasured complexity, area, and power costs.
- Performance impact varies wildly by workload, with some operations barely affected and others running 1.5x slower or worse under TSO.
- Contended writes are often exactly the performance-critical path, so avoiding their ordering cost isn't as free as implied.
- Weakly ordered CPUs still need fast barrier mechanisms that recreate much of the store-ordering and buffering logic anyway.
- Systems with strict total store order can stall unrelated memory banks to preserve global ordering, hurting scalability in ways weaker models avoid.
- The article is seen as too narrow in scope, missing historical examples like the Alpha architecture.

**By community**

- lobsters (mixed): Points to concrete measurements of Apple's TSO mode showing a nontrivial fundamental overhead, and flags the article's scope as too narrow given prior architectures like Alpha.
- hackernews (mixed): Splits between requests for foundational learning resources and a substantive debate over whether avoiding ordering costs on uncontended writes actually pays off given contended-path and multi-bank memory stalling concerns.

**Hottest debate:** Whether the ability to skip ordering overhead on uncontended writes is actually valuable, given that contended writes are often the performance-critical case and can force costly stalls in strongly ordered designs.

**Open questions**

- How much of the measured TSO overhead is a genuine architectural requirement versus an engineering artifact specific to Apple's implementation?
- What are the complexity, area, and power costs of implementing optimistic ordering, beyond just wall-clock performance?

**Highlights**

> It’s weird that this talks in terms of hypotheticals: multiple studies have directly measured the cost of TSO on the Mx series of chips where TSO is runtime configurable. The most thorough that I recall was this one: https://dl.acm.org/doi/pdf/10.1145/3779212.3790129?download=true Rather than just comparing perf and making claims it actually investigates whether the deltas are an inherent requirement of TSO or an engineering artifact. That said even they found a fundamental of more than 3%, and of course none of these studies can investigate the complexity cost of the implementation itself (eg additional design complexity, area, power usage, etc) just the wall clock performance.
> — [olliej on lobsters · 1 points, 2 comments](https://lobste.rs/s/idtlvo/memory_ordering_cpus#c_b7ddne)

> Yes, but the contended case is often the critical part of an application’s performance. Weakly ordered CPUs therefore need fast barrier mechanisms, which in turn means re-creating much of the store-ordering, writeback buffering, and commit logic anyway.
> — [StillBored on hackernews · 2 comments](https://news.ycombinator.com/item?id=49451907)

> Oh, thank you for finding it--I was thinking of TSO mode on the M-series and thinking someone could try running code in TSO mode just to test, and lo and behold some folks have. It leaves me more impressed than I expected to be with how well those chips handle two memory models. The wide variation is interesting too--some things look barely affected (compression; guess it's cache-heavy and not very contended) but some are at 1.5x or worse.
> — [twotwotwo on lobsters · 1 points](https://lobste.rs/s/idtlvo/memory_ordering_cpus#c_tqszyd)

> One advantage they have for building larger systems is that they allow you to crack stores into two parts. The part that has to retire in order for the local CPU and the write back to memory. Now assume you have multiple banks of memory and one of them stalls. A system with TSO can't allow the other banks to make progress because that would make the stores visible to other CPUs (or peripherals) out of program order. So you have to stall stores to otherwise ready memory banks and hold on to valuable ROB and store queue resources for longer.
> — [crest on hackernews](https://news.ycombinator.com/item?id=49458323)

> The whole time I was reading this, I was screaming at the screen, "but what about Alpha???" I think he's got too narrow a scope in this artcle.
> — [classichasclass on lobsters · 1 points](https://lobste.rs/s/idtlvo/memory_ordering_cpus#c_q1k0lv)

**Source threads**

- [lobsters](https://lobste.rs/s/idtlvo/memory_ordering_cpus) · 21 points · 4 comments
- [hackernews](https://news.ycombinator.com/item?id=49439943) · 18 points · 5 comments
- [hackernews](https://news.ycombinator.com/item?id=49444148) · 2 points · 0 comments
- [hackernews](https://news.ycombinator.com/item?id=49448167) · 1 points · 6 comments

## Similar posts on daily.dev

- [The scourge of x86 emulation](https://daily.dev/posts/the-scourge-of-x86-emulation-dcwg2dhgw) · Lobsters · 0 upvotes · 0 comments
- [Emulating Memory Access: How Hard Can It Be?](https://daily.dev/posts/emulating-memory-access-how-hard-can-it-be--x1wegf4c0) · Hackaday · 0 upvotes · 0 comments
- [The RISC vs CISC debate is dead because both sides stole each other's best ideas](https://daily.dev/posts/the-risc-vs-cisc-debate-is-dead-because-both-sides-stole-each-other-s-best-ideas-cblqn2ion) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#hardware](https://daily.dev/tags/hardware), [#arm](https://daily.dev/tags/arm)

[View this post on daily.dev](https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Memory ordering in CPUs","url":"https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic"},"datePublished":"2026-08-25T20:20:39.790Z","dateModified":"2026-08-27T01:46:11.537Z","description":"Common claims that weakly ordered architectures like ARM or RISC-V are inherently more scalable than strongly ordered ones like x86 or SPARC rest on a...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Ryg blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ryg blog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/cbbbf0522b2b416c99ad120f19df5b88","url":"https://daily.dev/sources/fgiesen"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"hardware,arm","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ryg blog","item":"https://daily.dev/sources/fgiesen"},{"@type":"ListItem","position":3,"name":"Memory ordering in CPUs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic#faq","mainEntity":[{"@type":"Question","name":"Do CPUs actually follow their memory model rules for every single memory access?","acceptedAnswer":{"@type":"Answer","text":"No, most CPUs only promise to behave as if they followed the rules. They implement memory ordering optimistically, assuming most loads and stores are uncontended, and execute out of order accordingly. Only when contention is detected between the time an instruction executes and commits does the CPU roll back and retry to enforce correct ordering. Exceptions are tiny in-order microcontrollers, often without caches, which follow the rules literally but slowly. daily.dev surfaces deep architecture explainers like this for engineers reasoning about concurrency performance."}},{"@type":"Question","name":"What is the measured performance cost of hardware TSO mode on Apple Silicon?","acceptedAnswer":{"@type":"Answer","text":"Apple Silicon's optional hardware TSO mode, used to support Rosetta x86 emulation, is often quoted as costing around 7% performance versus its native relaxed ARM mode. This figure is specific to that implementation since Apple Silicon cores are tuned for typical AArch64 workloads with mostly relaxed loads/stores, not optimized for TSO, so it should not be generalized to other architectures. Engineers weighing x86 versus ARM performance trade-offs can track findings like this on daily.dev."}},{"@type":"Question","name":"Why don't weakly ordered CPUs like ARM show a clear scalability advantage over strongly ordered CPUs like x86 in many-core systems?","acceptedAnswer":{"@type":"Answer","text":"Because contention, not raw memory model strictness, is the actual bottleneck in practice. Server systems with hundreds of cores in both ARM and x86 varieties show similar characteristics: good performance on shared-nothing workloads, finicky NUMA setups, and severe slowdowns at contention choke points, suggesting the weak-versus-strong distinction matters far less than vendor-specific microarchitecture differences. daily.dev helps engineers comparing many-core ARM and x86 systems keep up with architecture research like this."}}]}
```

