← All pins

Pins tagged “performance”

The when, why and how of waiting and backoff in multi-threaded applications on Arm

Article about what a thread on ARM CPU should actually do while it waits, whether spinning on a lock or retrying a failed atomic. The core observation is that contention comes from multiple threads touching the same cache line with at least one writer, so backing off cuts memory traffic and improves both throughput and fairness. The interesting part is the how: building delays from the counter timer, the ISB trick needed on older Armv8 cores, WFET on Armv8.7 for lower power, and a catalogue of approaches that look right but are not, including empty loops, YIELD, and SEVL plus WFE.

armperformanceconcurrency

DuckDB Internals: Why is DuckDB Fast?

A practical walk through DuckDB internals, starting with why running in process avoids client protocol overhead and then following SQL through parsing, binding, optimization, physical planning, pipelines, and storage.

There is also a second part from the series which goes further into DuckDB's vectorized execution engine, precompiled inner loops, SIMD, and push based pipelines.

databasesduckdbperformance

What Every Programmer Should Know About Memory

Ulrich Drepper's classic long-form guide to how modern memory hardware actually works: CPU caches, cache coherency, virtual memory, NUMA, and the concrete techniques you can use to write cache-friendly code. Dated in a few specifics but still the single best foundation for reasoning about memory performance on today's machines.

performancehardwarec