I tried a little experiment and switched out the old kdtree library for kiddo, a performance-improved fork of the now 2-year-old kdtree. (fair disclosure: I'm the maintainer of kiddo).
This resulted in a huge improvement in performance on the benchmark. Tested on a Ryzen 5900X, I got the following result for the old master branch:
316.1 microseconds.
After my refactoring, I got the following result:
409.9 nanoseconds - i.e. 0.4 microseconds! Faster by a factor of 790 😎
I tried a little experiment and switched out the old kdtree library for kiddo, a performance-improved fork of the now 2-year-old kdtree. (fair disclosure: I'm the maintainer of kiddo).
This resulted in a huge improvement in performance on the benchmark. Tested on a Ryzen 5900X, I got the following result for the old master branch:
316.1 microseconds.
After my refactoring, I got the following result:
409.9 nanoseconds - i.e. 0.4 microseconds! Faster by a factor of 790 😎