Commit Graph

2 Commits

Author SHA1 Message Date
ykiko
e1dde9ee92 fix(index): address pre-PR review findings
- Fix use-after-partial-move and division-by-zero in benchmark
- Use std::exchange in ContextBitmap move operations
- Add clarifying comments on operator== mixed mode and hash() sorting
- Add tests: compilation-context merge cache hit, hash determinism,
  any_not_in empty inputs, remove edge cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 14:49:39 +08:00
ykiko
005fc9ac21 feat(index): optimize merge with ContextBitmap, hash caching, and selective merge
Introduce ContextBitmap (tagged-pointer inline bitmap for <63 ids) to
replace roaring::Roaring in MergedIndex hot paths, eliminating heap
allocations in the common case. Cache FileIndex SHA256 hashes to avoid
recomputation. Add selective ProjectIndex::merge that skips symbols not
referencing newly-merged files. MergedIndex::merge now returns bool to
indicate cache hits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 14:49:39 +08:00