Core: performance numbers

September 17, 2026 · View on GitHub

All figures below were moved verbatim from crates/velesdb-core/README.md to keep that file under the 400-line documentation budget. The measurement methodology — hardware, flags, dataset construction — is in docs/BENCHMARKS.md; the reproducible kit is in benchmarks/.

Unless stated otherwise, every latency was measured on an Intel Core i9-14900KF, 64 GB DDR5, Rust 1.94.1, AVX2, --release, target-cpu=native, run sequentially on an idle machine; the recall figures were re-measured on an Apple M5 Pro.


Headline number (canonical, full path)

450 µs p50 end-to-end vector search (10K vectors, 384D, WAL ON, recall ≥ 96%), measured 2026-03-27 on 1.7.2, when Balanced ran at ef 128 (report). Reproduce with benchmarks/velesdb_benchmark.py --recall.

Vector operations (768D)

OperationTimeRun (i9-14900KF, version)
Dot product21.7 ns2026-03-27, 1.7.2
Euclidean distance26.0 ns2026-04-03, 1.11.0
Cosine similarity33.1 ns2026-03-24, 1.7.0
Hamming distance35.8 ns2026-03-24, 1.7.0
Jaccard similarity35.1 ns2026-03-24, 1.7.0

The rows come from three runs on the same machine, one per date: compare two kernels only within one run. The 2026-04-03 run timed all five together: BENCHMARKS §1.

Index-only micro-benchmarks (10K vectors, 768D)

These measure individual components in isolation — no WAL, no metadata fetch, hot cache. They are not directly comparable to the end-to-end latency above.

Component micro-benchmarkResult
HNSW search, index only55 µs (k=10, Balanced mode; i9-14900KF, 2026-03-27 — 53.2 µs in a quiet Apple M5 Pro re-run, 2026-07-20)
VelesQL cache hit1.08 µs (~926K QPS)
Sparse search, index only (top-10)57.6 µs (v1.13.0, PR #621 — 16x faster than v1.12)
Recall@10 (Accurate mode)100% (10K/128D, recall_benchmark)

Key performance characteristics

  • End-to-end search latency: 450 µs p50 (10K/384D, WAL ON, recall ≥ 96%) — the canonical full-path number, measured 2026-03-27 on 1.7.2.
  • HNSW index-only micro-benchmark: ~55 µs (10K/768D, k=10, Balanced).
  • Insert throughput vs pgvector: no ratio is claimed. The Docker comparison kit is in benchmarks/, and no run of it is recorded for a current version.
  • Bulk import at collection level with persistence: measured at 384D only — Upsert Path Optimization; no recorded run measures it at 768D.
  • ColumnStore filtering: up to 130x faster than JSON scanning at scale (integer equality, 100K rows); string equality up to 75x.

Recall by configuration (native Rust, Criterion)

ConfigModeef_searchRecall@10Status
10K/128DBalanced16099.8%
10K/128DAccurate512100.0%
10K/128DPerfectexhaustive100%
10K/128DAdaptive32, then 64 if hardnot measured

Recall re-measured 2026-09-10 on 6.0.0 at the current presets (recall_benchmark, an index built with HnswParams::max_recall). No recorded run measures latency at these presets, nor the Adaptive row (#2266); see BENCHMARKS §5.

Latency p50 = median over 100 queries. The 55 µs index-only micro-benchmark is for 10K/768D in Balanced mode — higher dimensions use SIMD more efficiently, so the 128D rows above are a worst case for recall measurement. The canonical end-to-end latency remains 450 µs p50 (2026-03-27, 1.7.2).

Where the speed comes from

  • Native HNSW with explicit SIMD: AVX-512 and AVX2 on x86_64 (runtime feature detection in simd_dispatch.rs), NEON on aarch64, scalar fallback everywhere else.
  • Adaptive search: a two-phase ef_search that escalates only for hard queries, so easy ones stop at a low ef_search (the gain is not measured yet, #2266).
  • Bulk insert: turbo/fast batch modes, parallel HNSW indexing, graduated ef_construction (VAMANA 3-phase), and lock-free entry-point reads (a small lock serializes its rare promotions).
  • Graph traversal: a CSR snapshot for zero-copy BFS/DFS, FxHashSet visited sets, and parent-pointer path reconstruction.
  • ColumnStore: typed columnar metadata instead of JSON scanning.
  • Query plan cache: see Core query plan cache.
  • GPU (optional, gpu feature): a wgpu-backed compute pipeline for batch distance kernels, falling back transparently to SIMD on hosts without a usable GPU.

Running the benchmarks yourself

# Any single Criterion bench declared in crates/velesdb-core/Cargo.toml
cargo bench -p velesdb-core --bench search_benchmark
cargo bench -p velesdb-core --bench hnsw_benchmark
cargo bench -p velesdb-core --bench simd_benchmark

The standardized SIFT1M ANN benchmark is feature-gated because its loader pulls flate2, tar, ureq and sha2 in as regular optional dependencies — never enable it in a shipping build:

cargo bench -p velesdb-core --bench sift1m_recall --features bench-sift1m

It also downloads a ~168 MB tarball on first run.

See also


Last updated: 2026-09-10 · Applies to: velesdb-core 6.0.0