Tag: cpp
All the articles with the tag "cpp".
-
Four Hash Maps, Three Key Distributions, and One Catastrophe
We wrote four hash map implementations, predicted how they'd perform, and declared open addressing the winner. Then we changed the key distribution and watched the winner become 11,000x slower.
-
When BFS Isn't Enough: From SPFA to Dijkstra on Network Delay Time
I accidentally implemented SPFA while thinking I was doing BFS with relaxation, then had to build a min-heap from scratch before I could do Dijkstra properly.
-
Benchmarking Tries, Part 2: What "Arena" Actually Means
My first "arena" trie wasn't an arena at all — fixing that revealed real cache locality effects, disassembly surprises, and data-oriented design wins.
-
Benchmarking Tries: Arena vs unique_ptr
Implementing a trie led me into cache effects, const_cast, and what the compiler can and can't optimize away.
-
Benchmarking Union-Find's Two Optimizations
A completely opaque data structure turned out to be a flat array of ints with two elegant optimizations — I benchmarked each one to understand what it actually contributes.
-
Building a Sampling Profiler with Claude
How I built a ptrace-based sampling profiler for Linux/AArch64 — what I wrote, what Claude wrote, and where it helped and didn't.
-
Advent of Code 2024
How I completed all 50 stars of Advent of Code 2024 using C++20.