Comparison
annoy vs faiss-cpu vs hnswlib vs pynndescent
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk.
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install annoyA library for efficient similarity search and clustering of dense vectors.
Actively maintained. Last release 3 weeks ago, commits in 26 of the last 26 weeks. A safe choice.
pip install faiss-cpuhnswlib
Low maintenance activity. Last release over 3 years ago, commits in 2 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install hnswlibNearest Neighbor Descent
Actively maintained. Last release 1 day ago, commits in 14 of the last 26 weeks. A safe choice.
pip install pynndescentIn short
- annoy is slowing down (last release over 3 years ago): fine for existing code, risky for a new project.
- faiss-cpu is the most used: 13.2M downloads a month, 1.7× more than pynndescent.
- Maintenance is comparable: faiss-cpu 85, pynndescent 79, hnswlib 24 on Pythie’s Index.
- pynndescent is growing fastest: downloads +11% over the last month.
- Safe default for a new project: faiss-cpu.
Side by side
| Metric | annoy | faiss-cpu | hnswlib | pynndescent |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 19 | Pythie’s Index: 85 | Pythie’s Index: 24 | Pythie’s Index: 79 |
| Verdict | Slowing down | Actively maintained | Low maintenance activity | Actively maintained |
| Downloads / month | 1M | 13.2M | 685.9K | 7.7M |
| Downloads, month over month | +5% | +7% | +0% | +11% |
| GitHub stars | 14.3K | 42K | 5.4K | 981 |
| Stars, last 7 days | – | – | – | – |
| Direct dependents | 123 | 1.1K | 133 | 103 |
| Last release | Jun 14, 2023 | Nov 10, 2026 | Dec 3, 2023 | Dec 1, 2026 |
| Releases, 12 months | 0 | 7 | 0 | 3 |
| Weeks with commits | 0 / 26 | 26 / 26 | 2 / 26 | 14 / 26 |
| Recent contributors | 21 | 37 | 20 | 12 |
| First release | Mar 2014 | Jul 2019 | Aug 2019 | Mar 2018 |
| Python versions | 3.3 – 3.9 | 3.10 – 3.14 | – | 3.11 – 3.15 |
| License | Apache-2.0 | MIT | Apache-2.0 | BSD-2-Clause |
| Known vulnerabilities | None | None | None | None |
Bold marks the best value in each row. Pythie’s Index rates maintenance out of 100: how it works.