Files
foxhunt/crates/ml-features
jgrusewski 6beedca110 perf(ofi): replace O(n) linear scan with binary search in get_snapshots_for_timestamp
The function was doing a linear scan through 14.5M sorted MBP-10 snapshots
for each of 1.12M OHLCV bars, resulting in ~16.2 trillion comparisons.
Replaced with partition_point (binary search) for O(log n) per lookup,
reducing total comparisons to ~27M — a ~600,000x improvement.

This was the root cause of OFI computation taking 30+ minutes during
hyperopt data loading on H100.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:54:44 +01:00
..