Log
short notes. one paragraph or less.
Small things. Bugs I just hit, a flag I just learned, a benchmark that
surprised me. Newest at the top.
2026.05.28 . std::next on a list is not free
Caught this in the LOB last week. std::next on a bidirectional
iterator is O(n). I had it inside the insert path. Best-price queries
stayed O(1) but the insert quietly degraded on long price levels. The fix
was two lines. The lesson is older than that: read your iterator
categories before you optimise.
2026.05.10 . epoll_wait batching
In FlashCache I had a 1:1 wait-to-handle ratio. Bumping the
maxevents to 1024 and processing the full batch inside one
syscall cut epoll_wait calls by 91% under load (verified with
strace -c). Throughput climbed by a third on pipelined
writes. Cheap change. Big return.
2026.04.18 . structured bindings and dangling refs
Spent half a day on a heap-use-after-free in the LOB. The cancel path
erased a node from an unordered_map one line after binding
references into it. Structured bindings make the bug look harmless. ASan
found it in two seconds.