hnswlib VS annoy

Compare hnswlib vs annoy and see what are their differences.

hnswlib

Header-only C++/python library for fast approximate nearest neighbors (by nmslib)

annoy

Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk (by spotify)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
hnswlib annoy
12 40
3,984 12,662
3.1% 1.2%
6.6 5.3
28 days ago 2 months ago
C++ C++
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

hnswlib

Posts with mentions or reviews of hnswlib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-14.

annoy

Posts with mentions or reviews of annoy. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-05.

What are some alternatives?

When comparing hnswlib and annoy you can also consider the following projects:

faiss - A library for efficient similarity search and clustering of dense vectors.

qdrant - Qdrant - High-performance, massive-scale Vector Database for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/

implicit - Fast Python Collaborative Filtering for Implicit Feedback Datasets

awesome-vector-search - Collections of vector search related libraries, service and research papers

Milvus - A cloud-native vector database, storage for next generation AI applications

semantic-search-through-wikipedia-with-weaviate - Semantic search through a vectorized Wikipedia (SentenceBERT) with the Weaviate vector search engine

TensorRec - A TensorFlow recommendation algorithm and framework in Python.

txtai - 💡 All-in-one open-source embeddings database for semantic search, LLM orchestration and language model workflows

fastFM - fastFM: A Library for Factorization Machines

ann-benchmarks - Benchmarks of approximate nearest neighbor libraries in Python

spotlight - Deep recommender models using PyTorch.