Building a Fast Lock-Free Queue in Modern C++ from Scratch
Summary
A guide to implementing a fast lock-free queue in modern C++, covering techniques for concurrent data structures without locks.
Similar Articles
Girls Just Wanna Have Fast MPMC Queues with Bounded Waiting
A technical blog post detailing the design and implementation of a lock-free MPMC queue with bounded waiting, including theory, advantages, limitations, and benchmark comparisons.
Your code is fast – if you're lucky
This article presents a branchless Quicksort implementation using sorting networks and discusses how modern compilers, especially Clang, optimize loops with branch-free instructions when written in the right style.
Efficient C++ Programming for Modern C++ CPUs, Chapter 4/part 2
This draft book chapter provides an infographic and detailed analysis of operation costs in CPU clock cycles for modern C++ CPUs, covering multiplication, division, and RTTI with latency tables for various architectures.
Optimizing a Spin-Lock
The blog post details optimizing a spin-lock in C++ to achieve a 5.7x speedup and 5.4x energy reduction through step-by-step improvements and benchmarks.
const_cast: A Necessary Evil
The article explains why const_cast is sometimes necessary in C++, specifically for moving objects out of a std::priority_queue, and how to do it safely.