Discover auction prices at supply and demand changes on fine tick grids

This commit is contained in:
2026-12-03 06:24:33 +08:00
parent 7fd67e7c8e
commit 12e26d6cc9
4 changed files with 133 additions and 17 deletions
+13
View File
@@ -62,4 +62,17 @@ fn main() {
measure("opening/8192-orders", 100, || {
black_box(&book).opening().len()
});
// Same order IDs, quantities, and distinct levels over a wider price grid.
let mut sparse = OrderBook::default();
for seq in 1..=8192 {
let side = if seq <= 4096 { Side::Sell } else { Side::Buy };
sparse.update(order(seq, side, 500_000 + 1_000 * (seq % 10), 1));
}
if sparse.opening().len() == 2049 {
measure("opening/8192-orders/sparse-ticks", 100, || {
black_box(&sparse).opening().len()
});
} else {
eprintln!("opening/8192-orders/sparse-ticks skipped: expected 2049 fills");
}
}