Releases: sdd/kiddo
v4.2.1
Chore
- Refactor trait bounds to silence new clippy lints
- Silence new lint error
- Silence error regarding doc_cfg no longer working
- Update codspeedhq/action action to v3
- Update rust crate generator to 0.8.1
π Bug Fixes
- Nearest_n_within does not limit num of items when not sorted, Issue:#168
- Update rust crate itertools to 0.13
v4.2.0
β¨ Features
- Add f16 support, example and docs to show usage with half crate
π Bug Fixes
- Prevent assertion failure when stem optimisation needs a large shift
v4.1.1
π Bug Fixes
- Prevent overflow in capacity_with_bucket_size on non-64 bit architectures
v4.1.0
Chore
- Remove unused import
- Update actions/cache action to v4
- Update codecov/codecov-action action to v4
- Update baptiste0928/cargo-install action to v3
Ci
- Fix issue with CI lint steps
Deps
- Relax strictness of some deps to reduce renovate noise
β»οΈ Refactor
- Remove need for gated import
β¨ Features
- Make tracing an optional dependency gated by tracing feature flag
- Iterate over trees
- Make rand and rayon optional
π Bug Fixes
- Stdsimd removed from unstable, fix:fixup simd removal
- Add missing global_allocate feature definition and sort feature defs alphabetically
- Update benches to require test_utils feature. update clippy and test steps to include new test_utils feature
- Claytonwramsey bug, Fixes:#138
π§ͺ Testing
- Fix iter doctests and remove unused var
- Add hacky workaround to enable tests to run without having to specify --features=test_utils
v4.0.0
Despite the major version bump, this is unlikely to be a breaking change for any users. The within_unsorted_iter
method of ImmutableKdTree
is now only present on x86_64 and aaarch64 targets.
Considering that v3.0.0 would not even compile on these targets when the immutable
crate feature was activated,
it seems vanishingly unlikely that this breaks anyone.
Additionally the immutable
feature has been removed and the global_allocate
feature added. If you were using ImmutableKdTree
and your build
breaks because the immutable
feature does not exist - don't worry, you don't need it any more.
Simply remove any reference to it ant the ImmutableKdTree
should be available without it.
β¨ Features
ImmutableKdTree
now works on stable
π Bug Fixes
- Update rust crate itertools to 0.12
- Re-enable support for wasm targets
π Documentation
- Update feature docs in lib.rs
v3.0.0-rc.1
Features
- the
ImmutableKdTree
is now only usable by enabling theimmutable
crate feature. This ensures that the crate as a whole retains compatible with stable rust, asImmutableKdTree
depends on some unstable features at present.
Refactors
- Leaf nodes for Immutable now store their points in columnar format. Searches across them have been re-written to autovectorise better. This has been tested on Compiler Explorer to demonstrate that AVX512 instructions are generated, ensuring vectorization is as wide as is possible. Handwritten SIMD intrinsics have been used (activated by enabling the
simd
crate feature) to manually vectorise code that the compiler could not autovectorize. NOTEsimd
is currently quite unstable and not as well tested as the rest of the library, so use it with caution until it stabilizes in the fullv3.0.0
release!
Style / Tests
- Increase reliability of
within()
test forImmutableKdTree
. - Remove some commented-out code and some useless comments
v3.0.0-beta.4
Style / Tests
- Increase reliability of
within()
test forImmutableKdTree
. - Remove some commented-out code and some useless comments in some tests
v3.0.0-beta.2
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).
v3.0.0-beta.1
Breaking Changes
- feat!: queries return structs instead of tuples. Query methods have been updated so that they all return
either aNearestNeighbour
,Vec<NearestNeighbour>
,
orVec<BestNeighbour>
, for consistency. - feat!: use a trait instead of a function pointer for distance metrics (See SquaredEuclidean and Manhattan)
- feat: add within_unsorted_iter query
Performance
- perf: refactor within to simply sort the result of within_unsorted.
Previously,within
was keeping its results in aBinaryHeap
and calling
itsinto_sorted_vec
method to, well, return a sortedVec
.
Whilst aBinaryHeap
is great if you are frequently adding and removing
items, if your use case is to gradually add all your items, and then sort
them all at once, its quicker to just put things in aVec
and then
sort theVec
at the end.
Benchmarking shows that this change improves performance by anything from
5 to 60% in practice.
v2.1.1
Refactor
- update Axis trait to include some methods so that the
nearest_one
methods can be identical betweenfloat
andfixed
. - float and fixed both use a common macro for best_n_within
- float and fixed both use a common macro for within_unsorted
- float and fixed both use a common macro for within
- float and fixed both use a common macro for nearest_n
CI
- Update pre-release.yml to remove Clippy check
- Add CI for format/clippy/test/coverage/release/publish