C++20 · WebAssembly · price–time priority
A limit order book engine,
live in your browser.
The ladder below runs the actual engine: the same C++ that clocks ~14M ops/s natively, compiled to WebAssembly. No frameworks, no server, one 100 KB module.
14Mops/s mixed flow
80 nsp50 latency
O(1)cancels
65tests, CI green
Order book
–
pricesizeorders
Synthetic flow
Submit an order
Trades
Depth
cumulative resting size, 40 levels per sideMeasured, not claimed
OBI predicts the next tick
Spearman IC between order-book imbalance and forward mid returns, live BTCUSDT capture replayed through the engine (5,087 snapshots, zero sync gaps):
0.571s
0.545s
0.4510s
Top-minus-bottom decile: +2.65 bps over 5s. Clears the half-spread, loses to taker fees, so it is a microstructure observation rather than a strategy. Full caveats in the notebook.
Engine benchmarks
| mixed flow (55/35/10) | ~14M ops/s |
| cancels | up to 42M ops/s |
| latency p50 | 80 ns |
| latency p99 | 374 ns |
| latency p99.9 | 1.5 µs |
Single thread, GCC 13 -O2, WSL2. Tail max ~1.4 ms is OS scheduler jitter on a non-isolated core — reported, not hidden.