Skip to content

Add arrwDB — Rust HNSW with AVX-512 intrinsics#626

Open
bledden wants to merge 1 commit into
erikbern:mainfrom
bledden:add-arrwdb
Open

Add arrwDB — Rust HNSW with AVX-512 intrinsics#626
bledden wants to merge 1 commit into
erikbern:mainfrom
bledden:add-arrwdb

Conversation

@bledden
Copy link
Copy Markdown

@bledden bledden commented Apr 16, 2026

Summary

  • Adds arrwDB, a vector database with a Rust HNSW core using explicit SIMD intrinsics
  • AVX-512 on Ice Lake (ann-benchmarks hardware), AVX2/FMA fallback for older CPUs
  • Lock-free bulk build, diversity-aware neighbor selection, thread-local visited lists

Benchmark Results (r6i.16xlarge, single-threaded)

SIFT-1M (128d, euclidean):

ef Recall@10 QPS
10 0.786 17,746
50 0.977 5,735
100 0.995 3,217
200 0.999 1,793

Deep-1M (96d, angular):

ef Recall@10 QPS
50 0.971 6,470
200 0.998 2,038
800 0.9999 631

GloVe-1.2M (200d, angular):

ef Recall@10 QPS
50 0.759 2,761
400 0.921 473
800 0.953 252

Files

  • ann_benchmarks/algorithms/arrwdb/module.py — BaseANN adapter wrapping RustFastHNSWIndex
  • ann_benchmarks/algorithms/arrwdb/Dockerfile — Installs Rust, builds arrwDB from source with target-cpu=native
  • ann_benchmarks/algorithms/arrwdb/config.yml — M=16/24/32/48 configurations
  • ann_benchmarks/algorithms/arrwdb/__init__.py

Test plan

  • Docker build succeeds: python install.py --algorithm arrwdb
  • SIFT benchmark runs: python run.py --algorithm arrwdb --dataset sift-128-euclidean
  • Results appear on plot: python plot.py --dataset sift-128-euclidean

🤖 Generated with Claude Code

arrwDB is a vector database with a Rust HNSW core using explicit SIMD
intrinsics (AVX-512 on Ice Lake, AVX2/FMA fallback).

On r6i.16xlarge (same hardware as ann-benchmarks):
- SIFT-1M: 1,793 QPS at 0.999 recall, 17,746 QPS at 0.786
- Deep-1M: 2,038 QPS at 0.998 recall, 20,082 QPS at 0.785
- GloVe-1.2M: 252 QPS at 0.953 recall

Key implementation details:
- Lock-free bulk build with diversity-aware neighbor selection
- AVX-512 L2 distance kernel (4x 512-bit accumulators)
- Thread-local visited lists with generation counter
- Prefetch 3-ahead for memory latency hiding

Repository: https://github.com/bledden/arrwDB
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.

1 participant