This project benchmarks a few different k-d tree libraries in different scenarios. It measures construction time as well as query time, across a matrix of tree sizes, dimensionality, and underlying data type.
Comments and contributions are welcome.
A companion webapp to this test suite exists where the results can be explored interactively, at https://sdd.github.io/kd-tree-comparison-webapp/.
The repository for the visualisation webapp is at https://github.com/sdd/kd-tree-comparison-webapp
(full disclosure: I'm the author of Kiddo)
- Kiddo v5.x
- Kiddo v3.x
- Kiddo v2.x
- Kiddo v1.x / v0.2.x
- FNNTW v0.2.3
- nabo-rs v0.2.1
- pykdtree v1.3.4
- sklearn.neighbours.KDTree v1.2.2
- scipy.spatial.KDTree v1.10.1
cargo criterion --message-format json > all-benchmarks.ndjson
jq -s '.[] | select(.reason == "benchmark-complete") | with_entries(select([.key] | inside(["id", "mean"])))' < all-benchmarks.ndjson | jq -s > all-benchmarks.json
- Processor: Ryzen 5900X (12/24 core)
- Memory: 32Gb DDR4, 3600MHz