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
4adex added a commit that referenced this pull request Jul 23, 2026
* feat: add batch insert and search (#74)

Signed-off-by: Arshdeep54 <balarsh535@gmail.com>

* Inmemory storage implementation (#82)

* Implement in-memory storage engine

* Wire in-memory storage through API snapshots

* Add HTTP smoke coverage for in-memory storage

* Handle in-memory storage errors in gRPC

* Add in-memory checkpoint header

* Add async Python client (#83)

* Add async Python client

* Deduplicate Python gRPC connection helpers

* Benchmarking optimizations (#84)

* Reduce in-memory checkpoint lock scope

* Optimize HNSW distance calculations

* Expose HNSW tuning parameters

* Add Python batch vector client methods

* Expose KD-tree rebuild tuning parameters

* Update tui with new name and details (#79)

* Support query-time HNSW ef

* Async batch support (#85)

* Update Python client to support batch insert and search

* Add batch support to the async client

* Add master test script for all usage example files

Run linter on client/python

* Add test for api parity between sync and async classes

---------

Signed-off-by: Arshdeep54 <balarsh535@gmail.com>
Co-authored-by: Arshdeep Singh <110114582+Arshdeep54@users.noreply.github.com>
Co-authored-by: Khushal Agrawal <117133859+SK1PPR@users.noreply.github.com>
Co-authored-by: Khushal Agrawal <dev@khushal.net>
Co-authored-by: Prachet Patel <patelprachet@gmail.com>
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