Vector index explorer
Build real HNSW and IVF indexes over random vectors in your browser, sweep efSearch and nprobe for the recall/latency trade-off, and do the memory maths for float32, int8, PQ and binary.
Real vs simulated: The indexes are real implementations on synthetic vectors; timings are your browser’s, not a vector database’s.
Synthetic data: 24 clusters on the unit sphere. 40 queries, recall@10 against exact search. Builds take a second or two.
Build the indexes to see the recall/cost trade-off.
Memory maths at your scale
| Encoding | Per vector | Total | Notes |
|---|---|---|---|
| float32 | 4.1 KB | 41.0 GB | Full precision — the baseline |
| float16 / bfloat16 | 2.0 KB | 20.5 GB | Half the memory, recall essentially unchanged |
| int8 scalar quantisation | 1.0 KB | 10.2 GB | 4× smaller; small recall loss, usually fixed by rescoring |
| Product quantisation (64 × 8-bit codes) | 64 B | 640.0 MB | 64× smaller; needs rescoring with full vectors for top results |
| Binary (1 bit per dimension) | 128 B | 1.3 GB | 32× smaller; only with rescoring, and only for models trained for it |
| HNSW graph links (M=12) | 96 B | 960.0 MB | Extra, on top of whichever vector encoding you keep in memory |
Excludes metadata, IDs and replicas. A common production shape: int8 or PQ codes in RAM for the search, full-precision vectors on disk to rescore the top few hundred.