A C++20 price-time-priority matching engine, compiled to WebAssembly and
matching orders in your browser. Not a model of the engine β this
is xc_core: the same order book, risk checks and kill
switch that the native binaries and the 383-test suite run against.
Source.
| Price | Quantity | Orders |
|---|
The nanoseconds-per-command figure above is a browser number, and
browsers cannot measure this.
performance.now() is deliberately coarsened to defeat timing
side channels β typically 100 Β΅s to 1 ms β against operations that
take tens of nanoseconds. So this page times a whole batch between two clock
reads and divides, which the resolution does support, and does not show
per-operation percentiles at all, because it genuinely cannot measure them.
WebAssembly also runs several times slower than native here.
The native p50/p99/p99.9, measured with a timer that resolves 41.67 ns
and reported with the CPU, OS, compiler and flags that produced them, are in
docs/benchmarks.md.