omnigraph/crates
Ragnor Comerford 53d7f47909
Pass dense u32 ids through expand instead of round-tripping via String
BFS now emits Vec<u32> dense ids directly with HashSet<u32> per-source
dedup. Only the deduped set is stringified for Lance's IN-list. The
post-hydrate alignment uses a dense-indexed Vec<Option<u32>> instead of
HashMap<&str, usize>, giving O(1) lookup without repeated string hashing.

End-to-end on the bench_expand harness (release, M-series):

  query     baseline    after     speedup
  1k  hop3   460.2 ms    23.7 ms     19x
  10k hop2     4.21 s   139.9 ms     30x
  10k hop3    40.59 s    898.5 ms    45x
  30k hop2    11.71 s    490.2 ms    24x
  30k hop3   197.38 s      3.22 s    61x

The cost lived in stringifying every (src,dst) pair and re-hashing the
strings during alignment; once dense ids stay dense, the BFS inner loop
and the final fan-out both collapse to integer ops.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 12:07:25 +02:00
..
omnigraph Pass dense u32 ids through expand instead of round-tripping via String 2026-04-25 12:07:25 +02:00
omnigraph-cli Prepare v0.3.0 release (#44) 2026-04-21 19:11:34 +03:00
omnigraph-compiler Prepare v0.3.0 release (#44) 2026-04-21 19:11:34 +03:00
omnigraph-server Prepare v0.3.0 release (#44) 2026-04-21 19:11:34 +03:00