# erikbern/ann-benchmarks

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/erikbern-ann-benchmarks).**

5,685 stars · 902 forks · Python · MIT

## Links

- GitHub: https://github.com/erikbern/ann-benchmarks
- Homepage: http://ann-benchmarks.com
- awesome-repositories: https://awesome-repositories.com/repository/erikbern-ann-benchmarks.md

## Description

ann-benchmarks is a standardized benchmarking suite for evaluating approximate nearest neighbor (ANN) search algorithms. It provides a reproducible framework for comparing how different ANN implementations perform across multiple datasets and distance measures, using precomputed ground truth results stored in HDF5 files to ensure consistent accuracy measurements.

The project wraps each ANN library behind a common Python interface, allowing algorithms to be swapped without modifying the benchmarking harness. It orchestrates parameter sweeps over algorithm-specific hyperparameters to generate full speed-accuracy trade-off curves, and renders interactive scatter plots that visualize recall versus queries per second across different configurations. The suite includes a Dockerized execution environment that packages the entire benchmark pipeline, enabling identical results across different machines.

The framework supports algorithm verification through test suites that check correctness before benchmarking, and provides interactive result browsing with per-algorithm performance views, detailed metric inspection, and filtering by distance measure and dataset. It also accepts community algorithm contributions through pull requests, allowing new implementations to be added to the standardized comparison.

## Tags

### Data & Databases

- [Benchmarking Suites](https://awesome-repositories.com/f/data-databases/approximate-nearest-neighbor-search/benchmarking-suites.md) — Provides a standardized benchmarking suite for evaluating approximate nearest neighbor search algorithms with reproducible speed-accuracy trade-off curves.
- [Standardized ANN Benchmarks](https://awesome-repositories.com/f/data-databases/approximate-nearest-neighbor-search/standardized-ann-benchmarks.md) — Runs standardized speed-accuracy comparisons of ANN algorithms across multiple datasets and distance measures.
- [Speed-Accuracy Tradeoff Comparisons](https://awesome-repositories.com/f/data-databases/approximate-nearest-neighbor-search/speed-accuracy-tradeoff-comparisons.md) — Runs multiple ANN implementations on standardized datasets and reviews their speed-accuracy trade-offs. ([source](https://cdn.jsdelivr.net/gh/erikbern/ann-benchmarks@main/README.md))
- [Batch Query Execution](https://awesome-repositories.com/f/data-databases/batch-query-execution.md) — Runs all queries in a single batch against each index to measure throughput and latency.
- [Ground Truth Storage](https://awesome-repositories.com/f/data-databases/data-exporters/hdf5/ground-truth-storage.md) — Stores precomputed nearest neighbor results in HDF5 files to enable reproducible accuracy measurements.
- [Precomputed Ground Truth Datasets](https://awesome-repositories.com/f/data-databases/static-benchmark-datasets/precomputed-ground-truth-datasets.md) — Uses pre-split HDF5 datasets with ground truth top-100 neighbors to ensure reproducible results. ([source](https://cdn.jsdelivr.net/gh/erikbern/ann-benchmarks@main/README.md))
- [Benchmark Result Plotters](https://awesome-repositories.com/f/data-databases/query-result-fetching/comparative-result-views/benchmark-result-plotters.md) — Generates interactive scatter plots of recall versus queries per second for comparing ANN algorithm performance across configurations.

### Artificial Intelligence & ML

- [Hyperparameter Sweep Orchestrators](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/training-configuration-management/training-hyperparameter-configurations/hyperparameter-sweep-orchestrators.md) — Automates parallel execution of training runs with varying hyperparameters to generate speed-accuracy curves.

### Development Tools & Productivity

- [Python Library Wrappers](https://awesome-repositories.com/f/development-tools-productivity/python-library-wrappers.md) — Wraps each ANN library behind a common Python interface, enabling drop-in algorithm swapping without modifying the benchmarking harness.
- [Community Benchmark Contributions](https://awesome-repositories.com/f/development-tools-productivity/open-source-benchmarking-tools/community-benchmark-contributions.md) — Accepts community contributions to add new algorithms to the standardized benchmark suite. ([source](http://ann-benchmarks.com/))
- [ANN Algorithm Contributions](https://awesome-repositories.com/f/development-tools-productivity/open-source-benchmarking-tools/community-benchmark-contributions/ann-algorithm-contributions.md) — Allows adding custom approximate nearest neighbor implementations to the standardized benchmarking framework.

### DevOps & Infrastructure

- [Dockerized Benchmark Runners](https://awesome-repositories.com/f/devops-infrastructure/reproducible-environments/dockerized-benchmark-runners.md) — Packages the entire benchmark suite into Docker containers for reproducible execution across machines.
- [Algorithm Verification Testing](https://awesome-repositories.com/f/devops-infrastructure/rate-limiters/rate-limiting-algorithms/algorithm-verification-testing.md) — Runs test suites that check each nearest neighbor algorithm's function integrity before benchmarking.

### Education & Learning Resources

- [ANN Algorithm Comparisons](https://awesome-repositories.com/f/education-learning-resources/algorithmic-performance-comparison/ann-algorithm-comparisons.md) — Evaluates approximate nearest neighbor algorithms across multiple datasets and distance measures. ([source](http://ann-benchmarks.com))

### Testing & Quality Assurance

- [Containerized ANN Benchmarks](https://awesome-repositories.com/f/testing-quality-assurance/debugging-diagnostics/error-handling/benchmark-execution/reproducible-benchmark-scripts/containerized-ann-benchmarks.md) — Benchmarks ANN algorithms using Docker containers and precomputed HDF5 datasets with ground truth.
- [Per-Algorithm Result Views](https://awesome-repositories.com/f/testing-quality-assurance/agent-performance-benchmarks/benchmark-result-analysis/benchmark-result-comparison/benchmark-result-assembly/per-algorithm-result-views.md) — Provides per-algorithm performance views across all datasets with interactive plots. ([source](http://ann-benchmarks.com/))
- [Distance-Measure Filtered Comparisons](https://awesome-repositories.com/f/testing-quality-assurance/agent-performance-benchmarks/benchmark-result-analysis/benchmark-result-comparison/distance-measure-filtered-comparisons.md) — Filters benchmark results by distance measure and dataset to compare algorithm performance. ([source](http://ann-benchmarks.com/))

### Graphics & Multimedia

- [Interactive Benchmark Plots](https://awesome-repositories.com/f/graphics-multimedia/scatter-plot-rendering/interactive-benchmark-plots.md) — Generates interactive scatter plots visualizing recall versus queries per second across algorithms and datasets.

### Software Engineering & Architecture

- [ANN Performance Visualizations](https://awesome-repositories.com/f/software-engineering-architecture/path-planning-algorithms/algorithm-visualizations/ann-performance-visualizations.md) — Provides interactive plots showing recall, index size, and build time trade-offs for nearest neighbor search.

### System Administration & Monitoring

- [Interactive Metric Drill-Downs](https://awesome-repositories.com/f/system-administration-monitoring/logging/metrics-retrieval/metric-detail-retrieval/interactive-metric-drill-downs.md) — Allows clicking on result charts to reveal interactive plots for detailed metric inspection. ([source](http://ann-benchmarks.com))

### Part of an Awesome List

- [Model Evaluation and Benchmarking](https://awesome-repositories.com/f/awesome-lists/ai/model-evaluation-and-benchmarking.md) — Benchmarking environment for approximate nearest neighbor search algorithms.
