The workload is the result
Five layouts — std::map, sorted vector, flat array, 3-level bitmap, intrusive
treap — under the literature's uniform-random prices and replayed real ITCH.
The ranking does not survive the trip.
ITCH 5.0 codecs, five order-book layouts, a deterministic matching engine, multicast market data with recovery, an OUCH order-entry session — and three measurements the public literature was missing. Built in modern C++ as a working textbook.
Personal learning project, built on personal time and personal hardware, using only publicly available specifications and publicly available data. Not affiliated with, endorsed by, or derived from any employer, past or present. Sources: docs/SOURCES.md.
Five layouts — std::map, sorted vector, flat array, 3-level bitmap, intrusive
treap — under the literature's uniform-random prices and replayed real ITCH.
The ranking does not survive the trip.
read() vs recvmmsg() vs io_uring vs
AF_XDP, driven by the real 09:30:00 microburst (928k messages, peak bin
3.5× the mean): the burst triples the median, tails double, recovery takes ~2 ms — and
the sender-side accounting catches every measurement trap steady-state means hide.
Arrival → parse → book → decision → encode → send, attributed per stage in nanoseconds on hardware anyone can rent, with the instrumentation cost itself measured and subtracted.
5.0 µs, itemisedSame five data structures, same harness, same machine. The only variable is whether the prices look like a textbook benchmark or like Nasdaq at 09:30.
Numbers are medians of 5 pinned-core repetitions; full distributions, hardware counters, and the committed result files are in the paper. Data: Nasdaq's public 2019-12-30 sample day.
The exchange side (matching engine, market-data publisher, order gateway) and the participant side (feed handler, books, strategy) — connected by the same wire formats the real venue uses, each stage provable on its own.
Written for a strong Java/Python engineer who is a beginner in C++. Every
non-obvious construct carries a // C++ NOTE: explaining what breaks without it and
what the JVM analogue hides. The primer grows one chapter per concept, in the order the code
introduces it — with real disassembly from this repo's own binaries.
Every number traces to a committed result file and the exact command that made it. The data comes from Nasdaq's own public sample server.
# clone, build, test (g++-12, cmake ≥ 3.22)
git clone https://github.com/Abhishek-Aditya-bs/atlas && cd atlas
cmake --preset release && cmake --build --preset release && ctest --preset release
# fetch the public sample day and cut the opening window
scripts/fetch-data.sh
zcat data/itch/12302019.NASDAQ_ITCH50.gz | build/release/bench/itch_slice 09:25:00 10:30:00 \
> data/itch/rth-open.itch50
# claim 1: five layouts × two workloads, pinned, 5 reps + perf counters
scripts/bench_book.sh data/itch/rth-open.itch50 QQQ
# claim 2: the 09:30 microburst against each receiver backend
build/release/bench/burst_bench run recvmmsg itch data/itch/rth-open.itch50 09:30:00 5
# the determinism proof: byte-identical replay
build/release/src/engine_replay --gen 500000 42 j.jrn
build/release/src/engine_replay j.jrn && build/release/src/engine_replay j.jrn