4 ms·
Very nicely written -- as usual for Chris :) One minor nitpick: near the end, Chris recommends LSH for similarity retrieval. This may be a bad idea. That imple
by Radim 11y ago
Very nicely written -- as usual for Chris :)
One minor nitpick: near the end, Chris recommends LSH for similarity retrieval. This may be a bad idea. That implementation seems to perform very poorly: [benchmarks](https://github.com/erikbern/ann-benchmarks/pull/5#issuecomment-111750051 https://github.com/erikbern/ann-benchmarks/pull/5#issuecomme...)
As is often the case, simpler algorithms have fewer moving parts, and due to cache localities can even perform better than theoretically-big-O superior ones (see "bruteforce" in that same benchmark graph -- that's a simple linear database scan! Observe how it's faster than most fancy approximate algos).
Note that these benchmarks are run specifically on real world vectors (100 dimensional GloVe word vectors trained over 2 billion tweets), so they're highly relevant here.