Skip to content

Benchmarking optimizations#84

Merged
Arshdeep54 merged 5 commits into
refactorfrom
benchmarking-optimizations
Jun 12, 2026
Merged

Benchmarking optimizations#84
Arshdeep54 merged 5 commits into
refactorfrom
benchmarking-optimizations

Conversation

@SK1PPR

@SK1PPR SK1PPR commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR prepares VortexDB for ANN-Benchmarks integration by improving index configurability, reducing HNSW overhead, and adding Python batch client APIs for faster benchmark data loading.

Changes

  • Optimized HNSW distance calculation paths

    • Avoids unnecessary sqrt for Euclidean comparisons
    • Uses normalized cosine vectors with direct 1.0 - dot scoring
    • Simplifies visited-set handling during graph traversal
  • Exposed HNSW tuning parameters

    • HNSW_M
    • HNSW_M0
    • HNSW_MAX_LAYER
    • HNSW_EF_CONSTRUCTION
    • HNSW_EF
  • Exposed KD-tree rebuild tuning parameters

    • KD_TREE_BALANCE_THRESHOLD
    • KD_TREE_DELETE_REBUILD_RATIO
  • Added Python batch client APIs

    • insert_batch(...)
    • search_batch(...)
  • Regenerated Python gRPC stubs to include existing batch RPCs

  • Kept FlatIndex unchanged since it has no meaningful index-level tunables beyond query-time k and similarity

Testing

cargo test -p index
cargo test -p api
cargo test
cd client/python && UV_CACHE_DIR=/private/tmp/uv-cache-vortexdb uv run --extra dev pytest -q

@Arshdeep54 Arshdeep54 merged commit 8399088 into refactor Jun 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants