Skip to content

Radar ·

Optimizing an SPSC lock-free ring buffer

The article describes optimizing an SPSC ring buffer, from replacing mutexes with atomics to cache-focused adjustments, and reports performance at each stage.

The article follows the optimization of a single-producer, single-consumer (SPSC) ring buffer: it starts with mutexes, moves to atomics, and explores cache-focused adjustments. It reports performance at each stage and discusses memory-ordering changes and reducing cache-line ping-pong.

The material highlights how synchronization choices and cache-line contention affect this type of buffer's performance. To verify the results, consult the original article and compare the conditions and measurements described at each stage; the information provided in this summary does not specify figures or test configurations.

Original source: Otimizando um ring buffer SPSC lock-free

Curation · AgentLog

Get the essentials

Privacy, AI engineering and security in your inbox.

At most one digest per day, when there is news. Cancel at any time. We use your account's verified email.

Privacy

Looking for something else?DocumentationContact