Skip to main content

Overview

VecLabs delivers sub-5ms p99 query latency at scale with 88% lower costs than Pinecone. Our Rust HNSW implementation has no garbage collector, eliminating latency spikes under concurrent load that plague Python and Go-based vector databases.
All benchmarks measured on Apple M2, 16GB RAM. Real hardware, real measurements.

Query Performance

Standard Benchmark (100K vectors, 384 dimensions, top-10)

VecLabs

  • p50: 1.9ms
  • p95: 2.8ms
  • p99: 4.3ms
  • Language: Rust (no GC)

Pinecone s1

  • p50: ~8ms
  • p95: ~15ms
  • p99: ~25ms
  • Language: Go/Python

Qdrant

  • p50: ~4ms
  • p95: ~9ms
  • p99: ~15ms
  • Language: Rust

Weaviate

  • p50: ~12ms
  • p95: ~25ms
  • p99: ~40ms
  • Language: Go

Why VecLabs Is Faster

Python and Go have garbage collectors that introduce unpredictable latency spikes during query execution. Rust has no GC—memory is managed at compile time. This means consistent, predictable sub-millisecond latency even under high concurrent load.
Our HNSW (Hierarchical Navigable Small World) graph implementation is built from scratch in Rust with zero runtime overhead. No abstraction layers, no VM, no interpreter—just native machine code executing graph traversal at CPU speed.
The query engine runs entirely in memory with serialization support for persistence. No network hops to remote storage during query execution. Vector retrieval happens at RAM speed.

Benchmark by Dimension

Query performance across different embedding dimensions (10K vectors, top-10 results):
DimensionsUse Casep50 Latencyp99 Latency
128Lightweight embeddings< 1ms< 2ms
384MiniLM, all-MiniLM-L6-v21.9ms4.3ms
768BERT-base, Sentence-BERT2.1ms4.8ms
1536OpenAI text-embedding-3-small2.4ms5.2ms
VecLabs performance scales linearly with dimension size. Higher dimensional embeddings require more distance calculations but remain under 5ms p99.

Cost Comparison

Monthly Cost: 1 Million Vectors

VecLabs

~$8/month
  • Storage: ~$0.04 (Shadow Drive)
  • Merkle updates: ~$0.00025/tx
  • Query compute: User infrastructure
  • 88% cheaper than Pinecone

Pinecone s1

$70/month
  • Storage: Included
  • API access: Included
  • Query compute: Pinecone cloud
  • Lock-in to proprietary infrastructure

Qdrant

$25+/month
  • Cloud hosting required
  • Self-hosted option available
  • Infrastructure management overhead

Weaviate

$25+/month
  • Kubernetes deployment typical
  • Cloud provider costs
  • Ops complexity

Cost Breakdown: VecLabs Architecture

| Component | Cost | Details | |-----------|------|---------|| | Vector Storage | ~0.04/monthShadowDrivedecentralizedstorage( 0.04/month | Shadow Drive decentralized storage (~0.000039 per MB per epoch) | | Merkle Root | ~0.00025/txSolanatransactionfee,400msfinalityQueryCompute0.00025/tx | Solana transaction fee, 400ms finality | | **Query Compute** | 0 | Rust binary runs on your infrastructure | | Data Ownership | Priceless | Encrypted with your Solana wallet—VecLabs cannot read your data |
Pinecone p1 performance pods cost 280/monthfor1Mvectors.VecLabsdeliverscomparableperformanceat280/month** for 1M vectors. VecLabs delivers comparable performance at **8/month—a 97% cost reduction.

Benchmark Methodology

Test Configuration

// HNSW Parameters
let index = HNSWIndex::new(
    m: 16,              // Connections per layer
    ef_construction: 200, // Construction search depth
    metric: DistanceMetric::Cosine
);

// Test Dataset
- Vectors: 100,000
- Dimensions: 384
- Distribution: Random normalized float32
- Query: top-10 nearest neighbors

Hardware Specifications

Test Machine

  • CPU: Apple M2 (8-core)
  • RAM: 16GB unified memory
  • OS: macOS Sonoma
  • Rust: 1.85+ with release optimizations

Benchmark Tool

  • Framework: Criterion.rs
  • Samples: 100 iterations per benchmark
  • Warmup: 10 iterations
  • Statistical analysis: Included

Distance Functions

Performance by similarity metric (384 dimensions): | Metric | Operation | Latency | |--------|-----------|---------|| | Cosine Similarity | Dot product + normalization | ~50ns | | Euclidean Distance | L2 norm | ~45ns | | Dot Product | Raw vector multiplication | ~40ns |

Running Benchmarks Yourself

Install Dependencies

git clone https://github.com/veclabs/veclabs
cd veclabs
cargo build --release --workspace

Run Full Benchmark Suite

# Run all benchmarks with Criterion
cargo bench --workspace

# Run specific benchmark
cargo bench --bench hnsw_bench
cargo bench --bench distance_bench

# Generate HTML report
open target/criterion/report/index.html

Custom Benchmark

use solvec_core::{hnsw::HNSWIndex, types::DistanceMetric};
use std::time::Instant;

fn main() {
    let mut index = HNSWIndex::new(16, 200, DistanceMetric::Cosine);
    
    // Insert 100K vectors
    for i in 0..100_000 {
        let vector = random_vector(384);
        index.insert(Vector::new(format!("v{}", i), vector)).unwrap();
    }
    
    // Measure query latency
    let query = random_vector(384);
    let start = Instant::now();
    let results = index.query(&query, 10).unwrap();
    let duration = start.elapsed();
    
    println!("Query latency: {:?}", duration);
}

Reproducibility

1

Clone Repository

git clone https://github.com/veclabs/veclabs
cd veclabs
2

Build with Release Optimizations

cargo build --release --workspace
3

Run Criterion Benchmarks

cargo bench --workspace
4

View Results

Results are written to target/criterion/. Open the HTML report in your browser.
Benchmark source code: benchmarks/hnsw_bench.rs

The Garbage Collection Problem

Python and Go-based vector databases suffer from unpredictable GC pauses that spike latency during high query loads:
# Python GC can pause execution mid-query
import gc
results = index.query(vector, top_k=10)
# GC pause here = latency spike

Production Impact

Python/Go Vector DBs

  • ✗ Unpredictable latency spikes
  • ✗ GC pauses under concurrent load
  • ✗ Variable p99 latency
  • ✗ Degrades with scale

Rust VecLabs

  • ✓ Consistent sub-5ms p99
  • ✓ Zero GC pauses
  • ✓ Predictable latency at scale
  • ✓ Production-ready performance

Competitor Analysis

Pinecone

  • Strength: Managed service, zero ops
  • Weakness: 5.8x more expensive, slower queries, proprietary lock-in
  • Use Case: Teams prioritizing convenience over cost/performance

Qdrant

  • Strength: Also built in Rust, open source
  • Weakness: No on-chain verification, centralized storage, 3x VecLabs cost
  • Use Case: Self-hosted vector search without blockchain requirements

Weaviate

  • Strength: GraphQL API, strong community
  • Weakness: Go-based (GC pauses), slowest query times, complex ops
  • Use Case: Teams needing semantic search with graph capabilities

VecLabs

  • Strength: Fastest queries + on-chain verification + 88% cost reduction
  • Weakness: Alpha software, limited ecosystem integrations (for now)
  • Use Case: Production AI agents requiring verifiable, high-performance memory

Next Steps

Get Started

Install VecLabs and run your first query in under 5 minutes

Architecture Deep Dive

Learn how Rust HNSW + Solana + Shadow Drive work together

Migration Guide

Migrate from Pinecone to VecLabs in 30 minutes

Cost Calculator

Estimate your monthly VecLabs costs

Build docs developers (and LLMs) love