ST
StateTrace
Visual Quant & Low-Latency Systems Lab
GitHub

StateTrace

shared-counter atomic · 52.94 ns / atomic op

A visual lab for becoming a quantitative developer + researcher. Eight stages from concurrency foundations to ML on finance, sequenced bottom-up. Click any node to open it.

37 nodes (9 cards, 28 stubs)55 prereq edges5 unlock-only edges8 bridge edges
Edge filters
L0 · atomsL1 · combinatorsL2 · idiomsL3 · system patternsStage 1Concurrency Foundation4wStage 2Python for Production5wStage 3Statistics for Finance6wStage 4Backtest Engineering6wStage 5Market Microstructure4wStage 6C++ for Production8wStage 7Rust for Quant Systems7wStage 8ML for Finance8wShared CounterRace ConditionMutexGlobal Interpreter Lock (Py…Rust Borrow Checker vs RaceCache CoherencestubMetrics UndercountingstubVectorizationArrow Columnar LayoutPolars Lazy FramePandas vs Polars InternalsSharpe RatiostubBootstrap ResamplingstubMultiple TestingstubDeflated Sharpe RatiostubEvent-Driven BacktesterstubBacktest PitfallsstubPurged k-Fold CVstubTriple-Barrier LabellingstubOrder BookstubBid-Ask SpreadstubMarket ImpactstubOptimal ExecutionstubSmart PointersstubSTL AlgorithmsstubProfiling C++stubC++ vs Rust IdiomsstubOwnership RulesstubSend & Sync TraitsstubAsync vs Threading in RuststubPyO3 FFIstubPolars ArchitecturestubFeature Lookahead BiasstubCombinatorially Symmetric CVstubPBO — Probability of Backte…stubMeta-LabellingstubProbabilistic Calibrationstub
Shared Countershared-counterStage 1 · L0 · atom · synchronization✓ written

Replaces: the belief that an increment on a shared integer is atomic, and that `volatile` makes it so. Two threads, one `int64_t`, one `+1` each, one million times: the expected final value is 2,000,000; the observed value is closer to 520,000. The lost updates expose the read-modify-write window that all of synchroni…

Benchmarks run on Apple M1 Pro · 4 threads × 1M iterations × 10 repetitions, median reported. Refreshed 2026-05-13. Source in benchmarks/cpp + benchmarks/rust; rerun with pnpm bench. Schema in lib/curriculum.