Skip to content

v3.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@sdd sdd released this 18 Jun 20:00
· 139 commits to master since this release

Breaking Changes

  • feat!: queries return structs instead of tuples. Query methods have been updated so that they all return
    either a NearestNeighbour, Vec<NearestNeighbour>,
    or Vec<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 a BinaryHeap and calling
    its into_sorted_vec method to, well, return a sorted Vec.
    Whilst a BinaryHeap 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 a Vec and then
    sort the Vec at the end.
    Benchmarking shows that this change improves performance by anything from
    5 to 60% in practice.