proomt

Search

Search posts, papers, and topics

All posts

Hacker News front pageFEX-Emu31 min readintermediate

The scourge of x86 emulation

Summary

The article explains why emulating x86's strict TSO memory model on ARM's weak model is costly, shows microbenchmark results for acquire/release vs. LRCPC loads, and describes how newer ARM extensions and Apple Silicon's TSO mode restore performance.

  • Mapping every x86 load/store to ARM acquire/release instructions can degrade performance dramatically on many CPUs (e.g., AmpereOne).
  • ARMv8.3's LRCPC extension provides load instructions that match x86‑TSO semantics with near‑baseline performance, and FEX switches to them when detected.
  • Apple Silicon implements a thread‑wide TSO mode, allowing regular loads/stores to behave like x86‑TSO and eliminating the overhead seen on other ARM CPUs.
  • Split‑lock (unaligned atomic) accesses remain problematic for emulation because they can cause tearing and trigger kernel slowdowns.

Engineers building x86 emulators or porting x86 software to ARM need to understand the memory‑model mismatch and the hardware features that can mitigate its performance impact.

6/10

Related reading

  1. SiliconBench: Speed, Memory, and Fidelity for LLM Serving on Unified-Memory Desktops

    SiliconBench benchmarks nine Apple‑Silicon LLM serving engines on unified‑memory desktops, measuring speed, memory usage, and output fidelity across Qwen3, Qwen3.5, and Gemma‑4 models. It finds vllm‑metal doubles throughput at modest concurrency, memory budgets often fail to preserve headroom, and only three stacks satisfy all fidelity and model‑coverage requirements, with tensor‑parallel scaling…

    Hugging Face Daily Papersarxiv.org1 minpaper
  2. Benchmarking Wild vs Mold

    Reproduces Mold’s linker benchmarks on a 16‑core Ryzen, shows that configuration (filesystem, delete‑output, fork) explains most of the Wild vs Mold speed gap, and notes recent Mold releases and upcoming Wild tweaks that close the gap.

    Lobstersgithub.io4 minHN461lobste.rs52
  3. M5 Ultra Mac Studio Review

    The M5 Ultra Mac Studio (256 GB RAM) uses a quad‑die M5 Max architecture with an 80‑core GPU and 1.2 TB/s memory bandwidth, delivering ~70 % faster prompt‑to‑first‑token and token‑generation rates than the M3 Ultra. In the author’s tests Qwen3.8‑Flash‑Next hits 100 tokens/s on short prompts and 60‑85 tokens/s with 64‑256 KB context, making local AI agents (Open Minis, Hermes, Codex) feel snappy a…

    Hacker News front pagemacstories.net39 minHN191174
  4. Vectorized and performance-portable Quicksort (2022)

    Google’s Highway library now includes a fully portable SIMD‑vectorized quicksort that runs 9‑19× faster than C++ std::sort. By using compress‑store (or permute‑based emulation) for partitioning, the same C++ code targets AVX2, AVX‑512, NEON, SVE and RISC‑V V. Benchmarks show 0.5 GB/s on an Apple M1 and >1 GB/s on a 3 GHz Skylake, beating prior architecture‑specific sorts. The implementation and a…

    Hacker News front pagegoogleblog.com3 minHN460142
  5. Textbook review: Is Parallel Programming Hard, And, If So, What Can You Do About It?

    A detailed, personal review of Paul McKenney’s free online textbook on parallel programming. The author, coming from a TLA⁺/distributed‑systems background, finds the early chapters excellent for building intuition about CPU caches, memory ordering, and false‑sharing, but notes gaps (e.g., shallow coverage of C++11 atomics and MESI). The review is concrete, cites specific chapters, and offers prac…

    Lobstersahelwer.ca8 minlobste.rs21