velesdb-core
High-performance vector database engine written in Rust.
Features
- Blazing Fast: HNSW index with explicit SIMD (4x faster than auto-vectorized)
- Persistent Storage: Memory-mapped files for efficient disk access
- Multiple Distance Metrics: Cosine, Euclidean, Dot Product, Hamming, Jaccard
- ColumnStore Filtering: 122x faster than JSON filtering at scale
- Metadata Filtering: Filter search results by payload attributes
- VelesQL: SQL-like query language for vector operations
Installation
Quick Start
use ;
use json;
Distance Metrics
| Metric | Use Case |
|---|---|
Cosine |
Text embeddings, normalized vectors |
Euclidean |
Image features, spatial data |
DotProduct |
When vectors are pre-normalized |
Hamming |
Binary vectors, hash comparisons |
Jaccard |
Set similarity, sparse vectors |
Performance
| Operation | Time (768d) | Throughput |
|---|---|---|
| Dot Product | ~39 ns | 26M ops/sec |
| Euclidean Distance | ~49 ns | 20M ops/sec |
| Cosine Similarity | ~81 ns | 12M ops/sec |
| Hamming (Binary) | ~6 ns | 164M ops/sec |
- Search latency: < 1ms for 100k vectors
- ColumnStore filtering: 122x faster than JSON at 100k items
- Memory efficient with SQ8 quantization (4x reduction)
License
Business Source License 1.1 (BSL-1.1)
See LICENSE for details.