Feature/bench kdtree flann vs nanoflann#6438
Open
rtkartista wants to merge 2 commits intoPointCloudLibrary:masterfrom
Open
Feature/bench kdtree flann vs nanoflann#6438rtkartista wants to merge 2 commits intoPointCloudLibrary:masterfrom
rtkartista wants to merge 2 commits intoPointCloudLibrary:masterfrom
Conversation
Closes PointCloudLibrary#3860 (partial — search module benchmark) Adds benchmarks/search/bench_kdtree.cpp covering tree construction, kNN query, and radius search for pcl::search::KdTree (FLANN) vs pcl::search::KdTreeNanoflann (added in 1.15.1 / PointCloudLibrary#6250). Results on Legion 5 / i7-10750H / Ubuntu 24.04 / GCC 13 / Release: - Build 500k pts: 134 ms (FLANN) - kNN k=1: 0.875 us, k=20: 2.34 us (FLANN) - Radius r=5m: 13,049 us (FLANN) Benchmark skips silently if google-benchmark is not installed. Accepts optional PCD path as argv[1], falls back to synthetic cloud.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3860 (partial — search module benchmark)
What
Adds the first benchmark to the
searchmodule:benchmarks/search/bench_kdtree.cppBenchmarks
pcl::search::KdTree(FLANN) vspcl::search::KdTreeNanoflannacross three axes:
Results
Hardware: 12 threads / Ubuntu 24.04 / GCC 13 /
-O3 -mavx2Cloud:
table_scene_mug_stereo_textured.pcd(307,200 pts) for query benchmarks;synthetic uniform random for build benchmarks
Repetitions: 3 — mean reported
Tree construction (ms, lower is better)
kNN query (µs, lower is better)
Radius search (µs, lower is better)
nanoflann is 1.2–1.4× faster to build, 1.7–3.4× faster on kNN, and
8.4× faster on radius search — making it the clear default for
localization and mapping pipelines that call
radiusSearchin tight loops(normal estimation, ICP, GICP, NDT).
Notes
argv[1]; falls back to synthetic 100k-pt cloudPCL_HAS_NANOFLANNis definedregistration/featuresbenchmarks in follow-up PRs