<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3" -->

---
title: Benchmark of Approximate Nearest Neighbor libraries
description: A benchmark comparison of approximate nearest neighbor (ANN) libraries including Annoy, nmslib, FLANN, KGraph, Panns, Nearpy, and LSHForest. Annoy performs...
canonical: https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Benchmark of Approximate Nearest Neighbor libraries | daily.dev
og:description: A benchmark comparison of approximate nearest neighbor (ANN) libraries including Annoy, nmslib, FLANN, KGraph, Panns, Nearpy, and LSHForest. Annoy performs...
og:url: https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3
og:image: https://api.daily.dev/og/posts/KKkYedGK3.png
og:image:alt: Benchmark of Approximate Nearest Neighbor libraries
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Benchmark of Approximate Nearest Neighbor libraries

**[Erik Bernhardsson](https://daily.dev/sources/erikbernhardsson)** · 3 min read · 0 upvotes · 0 comments

## Summary

A benchmark comparison of approximate nearest neighbor (ANN) libraries including Annoy, nmslib, FLANN, KGraph, Panns, Nearpy, and LSHForest. Annoy performs competitively, beaten only by nmslib's SW-graph (2-3x faster at same precision), while outperforming FLANN and KGraph at high precisions (>95%). Panns, Nearpy, and LSHForest perform roughly 1,000x slower than the others. The post also highlights Annoy's unique mmap-based index loading feature and its ease of installation across platforms compared to competitors.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://erikbern.com/2015/07/04/benchmark-of-approximate-nearest-neighbor-libraries.html>

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#vector-search](https://daily.dev/tags/vector-search)

[View this post on daily.dev](https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Benchmark of Approximate Nearest Neighbor libraries","url":"https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3"},"datePublished":"2026-03-26T08:35:22.099Z","dateModified":"2026-03-26T08:37:15.730Z","description":"A benchmark comparison of approximate nearest neighbor (ANN) libraries including Annoy, nmslib, FLANN, KGraph, Panns, Nearpy, and LSHForest. Annoy performs...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e27fb47b870dbed7b8008169aa58512e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e27fb47b870dbed7b8008169aa58512e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Erik Bernhardsson","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Erik Bernhardsson","logo":"https://media.daily.dev/image/upload/s--SlM88DTW--/f_auto,q_auto/v1774514112/logos/erikbernhardsson?_a=BAMAMiWQ0","url":"https://daily.dev/sources/erikbernhardsson"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/benchmark-of-approximate-nearest-neighbor-libraries-kkkyedgk3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,vector-search","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Erik Bernhardsson","item":"https://daily.dev/sources/erikbernhardsson"},{"@type":"ListItem","position":3,"name":"Benchmark of Approximate Nearest Neighbor libraries"}]}
```

