Posts

Browse all published posts.

2026 3 writings

A lock-free SPSC ring buffer returned the correct sum on every run while containing a data race. Then a benchmark with a 2x noise floor almost convinced me the race was worth keeping. The fix was measurement, not luck.

An O(1) lock-free scheduler lost 4–5× throughput to false sharing: two threads fighting over one 64-byte CPU cache line. The fix was memory layout, not the algorithm.

There's no clean starting point for a log like this, so here's an honest one.