proomt

Search

Search posts, papers, and topics

All posts

LobstersAndrew Helwer8 min readintermediate

Textbook review: Is Parallel Programming Hard, And, If So, What Can You Do About It?

Summary

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…

  • Understanding hardware cache protocols (MESI) is crucial; the book mentions it only in an appendix, forcing readers to look it up elsewhere.
  • Compiler optimizations (load/store tearing, fusing, invented loads) can completely break naïve concurrent code – the book’s “Shared‑Variable Shenanigans” chapter illustrates this well.
  • False sharing dramatically hurts performance; per‑thread counter arrays (conflict‑free replicated data types) are a good pattern to avoid it.
  • The text focuses heavily on Linux‑kernel specifics; coverage of C++11/C11 memory‑order primitives (`std::memory_order`, `ACCESS_ONCE`) is brief.

Parallel programming bugs are notoriously hard to reproduce and debug. This review highlights a free, comprehensive resource that bridges low‑level hardware realities with software‑level concurrency pitfalls—knowledge essential for building correct, high‑performance systems.

6/10

Related reading

  1. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min
  2. Constraint Decay: The Fragility of LLM Agents in Backend Code Generation

    A systematic evaluation of LLM agents generating multi‑file backend code shows a sharp drop in correctness when structural constraints (framework conventions, ORM usage, API contracts) are added. Across 100 tasks in 8 Python web frameworks, assertion pass rates fall ~27 points, with data‑layer bugs (bad queries, ORM violations) driving most failures. Mid‑size models cope with minimal frameworks (…

    arXiv cs.SE (Software Engineering)arxiv.org1 minpaperHN287197
  3. 1 points

    Saving another 100TB of RAM with math (and Rust)

    Cloudflare reduced the memory footprint of its Pingora Backend Router by re‑examining the consistent‑hashing implementation in the pingora‑ketama library. By increasing the number of virtual hash points per server from the default 1 to the standard 160 (and applying weighted hashing based on disk capacity), they cut the per‑node overhead enough to reclaim >100 TB of RAM across the fleet. The post…

    Hacker News front pagecloudflare.com13 minHN478120lobste.rs33
  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