Discover auction prices at supply and demand changes on fine tick grids
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user