perf: use lexical symbol ids for rank ties

This commit is contained in:
boris
2026-09-05 06:14:49 +08:00
parent d7e11be01f
commit 52f9ee9d92
2 changed files with 11 additions and 18 deletions
+9
View File
@@ -5093,6 +5093,15 @@ mod tests {
)
.unwrap();
let lexical_symbols = ["000001.SZ", "000300.SH", "600000.SH"];
let lexical_symbol_ids = lexical_symbols.map(|symbol| data.symbol_id(symbol).unwrap());
assert!(
lexical_symbol_ids
.windows(2)
.all(|window| window[0] < window[1]),
"symbol ids are the stable lexical tie-break key"
);
for symbol in ["000001.SZ", "600000.SH"] {
let symbol_id = data.symbol_id(symbol).unwrap();
let day = data.daily_snapshot_view(date);