Blog

C++ Internals, Low-Level Systems, and Performance Engineering.

Long-form companion to LinkedIn posts.

Domain Title Date
language std::launder: Correct Per the Standard, Not Per What Breaks
templates Type Erasure: The Mechanism Behind std::function
templates CRTP: The Pattern Already Inside the Standard Library
memory new, operator new, Placement new, and malloc: Allocation vs Construction
language Value Categories: What Decides Copy vs Move
cpu True Sharing: When the Cost is Legitimate
language const, constexpr, consteval, constinit: Four Keywords, Four Different Promises
compiler constinit: Locks the Start, Not the Value
compiler consteval: A Compile-Time Function That Doesn't Take No for an Answer
compiler constexpr: Allowed to Run at Compile Time, Not Required To
compiler The Frame Pointer: Check Your Default Before Reaching for the Flag
language volatile: What It Does and What It Absolutely Does Not Do
compiler Compiler Optimization Levels: What Actually Changes from -O0 to -O3
language ABI: Why Compatible Code Can Still Break at Runtime
concurrency Memory Fences: What the Compiler and Hardware Each Actually Do
compiler Maximal Munch and Most Vexing Parse: Two Rules the Compiler Always Follows
stl std::array: Zero Overhead, Opt-In Safety
language Before and After main(): How C++ Programs Actually Start and End
cpu Out-of-Order Execution: How the CPU and Compiler Reorder Your Code
memory Hugepages and the TLB: Fewer Pages, Fewer Misses
memory Lazy Allocation and the Cost of the First Touch
low-latency Kernel Bypass Networking: Wire to Application without the OS in Between
cpu NUMA: Memory Locality and the Cost of Migration
cpu SIMD: One Instruction, a Batch of Values
compiler RVO and NRVO: Why std::move on a Return Statement is an Anti-Pattern
language vtables: The Hidden Cost of Virtual Dispatch
concurrency Lock-Free vs Wait-Free: The Actual Difference
compiler Undefined Behavior and the Disappearing Overflow Check
cpu CPU Pinning: Why Moving a Thread Costs More Than It Looks
cpu Branch Prediction: the Cost Is the Flush, Not the Branch
concurrency std::atomic Does Not Promise Lock-Free, and the API Around It
concurrency Memory Fences: A Wall With No Atomic Attached
concurrency Acquire/Release Memory Ordering: The One Way Wall Between Two Threads
cpu False Sharing: The Cache Line Bug That Looks Like Correct Code