Exa wrote about how they search the web: send each query to a few clusters, scan compressed codes, then rerank exactly. That idea inspired sieve, my own engine written from scratch in Rust, measured end to end, and pushed to a billion vectors on one laptop.
Head to head with Microsoft’s DiskANN, and ahead on the same 12 threads.
DiskANN is Microsoft’s index for data larger than memory, and the standard to beat. Both ran on the same laptop over the same 10M SPACEV vectors and queries, from a cold page cache, in about 0.5 GB of RAM each. Above recall 0.94, sieve answers in under 3 ms. It fetches its candidates from SSD in one parallel batch, while DiskANN waits on a chain of dependent reads.
Mean latency per query
Against recall@10, from SSD. Lower is better.
Throughput
Queries per second against recall@10. Higher is better.
The gap widens with recall
On the same 12 threads, sieve serves more queries per second than DiskANN from recall 0.91 up, and its lead grows as recall rises, to 1.6× at 0.97. Each extra point of recall costs DiskANN another round of dependent SSD reads; sieve still reads its candidates in one batch. Give DiskANN four times the threads and sieve still draws level from 0.955.
Show the data
Four steps, a few milliseconds.
01Route
The query is compared with 131,072 cluster centres, and only the closest clusters are opened.
02Scan
Every vector in those clusters is scored from a 1-bit RaBitQ code held in RAM, at about 950 million codes per second per core.
03Rerank
The best candidates are read exactly from SSD as int8 rows in one parallel batch, so 100 GB of vectors never has to fit in 24 GB of RAM.
04Return
The ten nearest come back. Median 2.7 ms, 99th percentile 11.2 ms.
Under 100 ms at a billion vectors, with room to spare.
Five configurations on the full SPACEV-1B benchmark, 10,000 queries each. Each bar runs from the median query to the 99th percentile. The dashed line is the 100 ms budget. The slowest p99 is 37.3 ms.
Search time only. Embedding the query and the network typically add 5–20 ms, which still leaves the slowest row inside the budget.
Built in seconds, served from half a gigabyte.
sieve builds the 10M index in 7 seconds, 24–30× faster than DiskANN, and needs a quarter of its memory when the index is held in RAM. It is designed for data that outgrows memory, the case the head-to-head above measures.
| sieve | DiskANN | |
|---|---|---|
| Index build, 10M, 12 threads | 7 s | 169–211 s |
| RAM, searching from SSD | 0.5 GB | 0.5 GB |
| RAM, searching in memory | 1.8 GB | 7.2 GB |
Show the in-memory results
When every vector already sits in RAM, DiskANN’s graph scores about 1,840 vectors per query against sieve’s ~222,000 compressed codes, and it is the faster choice there. sieve’s advantage starts where the data no longer fits.
Queries per second against recall@10, log scale, 12 threads each, everything in RAM.
One laptop, public data, every run reproducible.
- Built independentlyThe architecture was inspired by Exa’s write-up on how they search the web. The implementation, the tuning and every number here are sieve’s own.
- One machineApple M4 Pro, 12 cores, 24 GB of RAM, internal SSD. No servers, no GPU, no cloud.
- Public benchmarksMS SPACEV-1B (100-d int8) with official ground truth. Also 113.5M MS MARCO passages: recall 0.909 at 4.8 ms median.
- Cold means coldIndex files are evicted from the OS page cache before every SSD run, checked with
mincore. - Fair to DiskANNIts disk index had no macOS read path, so a small patch adds uncached
pread, matching its Linux path. - One recall metricThe head-to-head scores both systems with DiskANN’s strict recall@10. The 1B figures are tie-aware, within 0.001.