Vector Search Comparison · 2026
altor-vec vs Pinecone: Client-Side vs Cloud Vector Search
The choice between altor-vec and Pinecone is not about which is better — it is about deployment boundary. altor-vec runs in the browser with no server required. Pinecone assumes a server and gives you the controls that environment needs. Confusing those boundaries leads to either overbuilding a simple public search surface or underbuilding a private, business-critical retrieval pipeline.
npm install altor-vec · 54KB gzipped WASM · Sub-millisecond queries · Zero server requiredWhen to Use altor-vec
altor-vec wins when these conditions are true:
- Public or semi-public corpus — documentation, blog posts, product catalog, FAQ content that does not require access control
- Corpus size under ~200K vectors — HNSW in the browser scales well up to this range; above it, browser memory limits become a constraint
- Static or batch-updated index — the index is rebuilt on deployment or on a schedule, not updated continuously with individual writes
- Zero backend budget or complexity — no API key management, no per-query billing, no server to maintain
- Offline or edge use cases — PWAs, offline-first apps, or edge functions where a network call to a vector DB adds unacceptable latency
- Privacy-first requirements — user queries never leave the browser; no server logs the search
When to Use Pinecone
Pinecone wins when these conditions are true:
- Large private corpus — proprietary documents, customer data, or internal knowledge bases that should never be bundled into a client asset
- Corpus over ~200K vectors — or rapidly growing, where rebuilding and redeploying a full index on every update is impractical
- Continuous writes — new vectors are added frequently and search results must reflect the latest state without a full rebuild
- Multi-user shared index — many users querying the same vector store simultaneously, with server-side access control
- Strong access control required — role-based permissions, audit logs, SOC 2 compliance
Feature Comparison
| Capability | altor-vec | Pinecone |
|---|---|---|
| Runs in browser | ✅ Yes (WASM) | ❌ No |
| Server required | ❌ None | ✅ Required |
| Bundle size | 54KB gzipped | ~3KB SDK (queries remote) |
| Query latency | Sub-millisecond (local) | ~50–200ms (network round-trip) |
| Max practical scale | ~200K vectors | Billions of vectors |
| Index update model | Rebuild on deploy | Continuous upserts |
| Per-query cost | None | Based on pod/serverless plan |
| Access control | App-level only | Full cloud IAM |
| Offline support | ✅ Full | ❌ Requires network |
| Privacy (query stays on device) | ✅ Yes | ❌ No (server processes query) |
Code Comparison
altor-vec (browser, zero backend)
import init, { WasmSearchEngine } from 'altor-vec';
await init();
const engine = new WasmSearchEngine(384, 'cosine');
// Build index from your embeddings (Float32Array per vector)
for (const [id, embedding] of vectors) {
engine.add(id, new Float32Array(embedding));
}
// Query — runs locally, sub-millisecond
const results = engine.search(new Float32Array(queryEmbedding), 5);
// results: [{ id, score }, ...]
Pinecone (cloud, server-side)
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone({ apiKey: process.env.PINECONE_API_KEY });
const index = pc.index('my-index');
// Upsert vectors (server-side only)
await index.upsert([{ id: 'doc1', values: embedding, metadata: { text } }]);
// Query (requires network round-trip)
const result = await index.query({
vector: queryEmbedding,
topK: 5,
includeMetadata: true,
});
Migration: Pinecone → altor-vec
Migrating makes sense when your corpus is static, public, and under ~200K vectors. The steps:
- Export vectors from Pinecone using
index.fetch(ids)or a full export script - Convert each vector to a
Float32Arrayand store alongside your document metadata as JSON - Build the altor-vec HNSW index at build time (or in a Web Worker at first load)
- Serialize the index to a binary file and serve it as a static asset
- Load and query client-side — no API key, no network call
// Build script (Node.js, runs at deploy time)
import init, { WasmSearchEngine } from 'altor-vec';
import fs from 'fs';
await init();
const engine = new WasmSearchEngine(384, 'cosine');
const corpus = JSON.parse(fs.readFileSync('./vectors.json', 'utf8'));
for (const { id, embedding } of corpus) {
engine.add(id, new Float32Array(embedding));
}
// Serialize and write to public/
const bytes = engine.serialize();
fs.writeFileSync('./public/search-index.bin', Buffer.from(bytes));
Can They Coexist?
Yes — and this is a common production pattern. Teams use altor-vec for public-facing documentation or product search (zero cost, offline capable, privacy-preserving) and Pinecone for internal RAG pipelines over private documents (continuous updates, access control, large scale).
Frequently Asked Questions
- Is altor-vec better than Pinecone?
- altor-vec is better for browser-native, zero-infra search over public corpora under ~200K vectors. Pinecone is better for large private corpora with continuous writes and multi-user access control. Neither is universally better.
- Can altor-vec replace Pinecone?
- For browser-native and edge use cases with public data, yes. For large-scale private retrieval with continuous writes and access control, no. Many teams use both in the same product.
- How do I migrate from Pinecone to altor-vec?
- Export your Pinecone vectors, convert to Float32Array per vector, build an altor-vec HNSW index at build time, serialize to a binary file, and serve as a static asset. Full example above.