3 ms·
> Actually, you can implement HNSWs on disk, even if there are better data structures from the point of view of disk access latencies I built a KV-backed HNSW
by natenethercott 11mo ago
> Actually, you can implement HNSWs on disk, even if there are better data structures from the point of view of disk access latencies
I built a KV-backed HNSW in Rust using LMDB to address this exact usecase (https://github.com/nnethercott/hannoy https://github.com/nnethercott/hannoy). The trickiest part for sure is being clever with your IO ops since HNSW search requires tons of random reads to find the nearest neighbours. Especially if you're not on NVMe's (think EBS-based HNSW) you really start to feel the cost of those reads, even with all the fancy SIMD.
- antirez 11mo agoI too believe there are ways to make HNSWs work well enough on disk.