‹ BackHN Continuity

Thread

The scourge of x86 emulation

295 points · 100 comments · dagmx

  1. pdw · · focus · HN ↗
    The intro of this article repeats the common assertion that

    > ARM is the most relaxed, allowing significant hardware optimizations; and x86 is the most strict, enforcing a very strong coherency model that doesn’t allow a lot of room for optimization

    but I&#x27;ve seen some compelling arguments that a relaxed model doesn&#x27;t necessarily have much of a benefit, <a href="https:&#x2F;&#x2F;fgiesen.wordpress.com&#x2F;2026&#x2F;08&#x2F;25&#x2F;memory-ordering-in-cpus&#x2F;#320ecacb-31dd-4a74-bd34-de2dbf46b1e0" rel="nofollow">https:&#x2F;&#x2F;fgiesen.wordpress.com&#x2F;2026&#x2F;08&#x2F;25&#x2F;memory-ordering-in-...

    1. Aissen · · focus · HN ↗
      A recent study seemed to support Fabian&#x27;s well written article: <a href="https:&#x2F;&#x2F;dl.acm.org&#x2F;doi&#x2F;epdf&#x2F;10.1145&#x2F;3779212.3790129" rel="nofollow">https:&#x2F;&#x2F;dl.acm.org&#x2F;doi&#x2F;epdf&#x2F;10.1145&#x2F;3779212.3790129
      1. kccqzy · · focus · HN ↗
        It’s a question of how much resources to allocate to the hardware team, and how much resources to be distributed diffusely to the software engineers but especially to the compiler team.

        Even your linked paper contends that the actual observed slowdown is as much as 22% in the Geekbench example, but the thesis is that the slowdown is not inherent to TSO, but merely to the specific hardware implementation. Is it worthwhile for a company to optimize its TSO to chase the final gains, or is it better not to have this feature in the first place and just change the compiler?

        Indeed my instinct is that it is better to do this in software, where the programmer clearly communicates which stores are ordered, and which may happen in arbitrary order.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.