v3.0.0-beta.2
Pre-release
Pre-release
github-actions
released this
26 Aug 11:51
·
139 commits
to master
since this release
Introducing the ImmutableKdTree for floating point! π
ImmutableKdTree
is intended for use when the smallest possible on-disk serialized size of a tree is of paramount importance, and / or the fastest possible query speed is required.
Expect improvements in query time of 10-15%, and a reduction in the size of serialized trees by 33% or so on average.
These capabilities come with a few trade-offs:
- This tree does not provide the capability to modify its contents after it has been constructed. The co-ordinates of the points to be stored must have all been generated in advance.
- Construction time can be quite a bit slower. Typically, this can be twice as long as the default
kiddo::float::kdtree::KdTree
. - The more common that duplicate values are amongst your source points, the slower it will take to construct the tree. If you're using
f64
data that is fairly random-ish, you will probably not encounter any issues. I've successfully created 250 million nodeImmutableTree
instances with randomf64
data with no issues, limited only by RAM during construction. Likewise forf32
based trees, up to a few million nodes. As per the other Kiddo float-type trees, points being stored in the tree must be floats (f64
orf32
are supported currently).