nmslib / nmslib

Non-Metric Space Library (NMSLIB): An efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces.
Apache License 2.0
3.4k stars 450 forks source link

difference between hnsw and sw-graph? #241

Closed leafjungle closed 7 years ago

leafjungle commented 7 years ago

I think I am a new comer. I see in the benchmark: https://github.com/erikbern/ann-benchmarks, there are HNSW and SW-graph. both of them are based on nmslib. But I am not sure the difference? And it seems hard to find the answer in Google.

searchivarius commented 7 years ago

Hi @leafjungle HNSW is usually better (and sometimes substantially so), but there's currently a technical deficiency that HNSW can't save indices for spaces/distances other than dense vector spaces with L2/cosine.