annoy VS hnswlib

Compare annoy vs hnswlib and see what are their differences.

annoy

Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk (by spotify)

hnswlib

Header-only C++/python library for fast approximate nearest neighbors (by nmslib)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
annoy hnswlib
40 12
12,662 3,984
1.2% 3.1%
5.3 6.6
2 months ago 28 days 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.

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.

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.

What are some alternatives?

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

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

implicit - Fast Python Collaborative Filtering for Implicit Feedback Datasets

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

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

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

TensorRec - A TensorFlow recommendation algorithm and framework in Python.

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

fastFM - fastFM: A Library for Factorization Machines

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

spotlight - Deep recommender models using PyTorch.

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