Anatomy of llama.cpp: How 105K Stars of C++ Runs LLMs on Your Laptop

I spent a week reading llama.cpp's source. Not the GitHub README, not the model card — the actual C that runs when you type `./llama-cli -m llama-7b-q4.gguf`. What I found is one of the better-enginee

Modern C++ // dev Apr 20, 2026 13 min read

Contracts in C++26: What They Check, What They Cost, When to Use Them

That's GCC 15.2.1, `-O2 -std=c++26`, on an i7-4790 at 3.6 GHz. The function under test does one multiply. One precondition is checked.

Modern C++ // dev Apr 20, 2026 9 min read

Lock-Free Queue Implementations Compared: Correctness, Performance, and the Bugs You'll Ship

A `std::mutex`-protected `std::deque` is 12% faster than moodycamel::ConcurrentQueue when contention is low.

Modern C++ // dev Apr 20, 2026 12 min read

Profile-Guided Optimization Made Our Code Slower

That's the whole story. I took a virtual-dispatch interpreter loop — the textbook PGO target — instrumented it, trained it on a representative workload, and recompiled. Both GCC 15.2.1 and Clang 21.1.

Modern C++ // dev Apr 20, 2026 8 min read

std::expected on Bare Metal: Error Handling Without Exceptions

The `-fno-exceptions` build flag and `int` return codes. Every embedded C++ codebase I've worked on has both, and the pattern is always the same: return an error code, take an output pointer, hope the

Modern C++ // dev Apr 20, 2026 8 min read

Cache-Line Archaeology: Finding and Fixing False Sharing in Production

False sharing is a measurable, fixable performance bug that hides in struct layouts. Two atomic counters in the same cache line can cost you 6x throughput — and perf c2c finds it in seconds.

Modern C++ // dev Apr 19, 2026 9 min read