sdd / kiddo

Kiddo
Apache License 2.0
87 stars 14 forks source link

chore: release v2.1.1 #61

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

🤖 New release

Changelog

## 2.1.0 * feat: implement the main query methods plus `size` on `kiddo::float::kdtree::ArchivedKdTree` and improve the rkyv example. The previous Rkyv example was not really using Rkyv in the most efficient way (Thanks to @cavemanloverboy for spotting my mistakes!). In order to properly use rkyv'z zero-copy deserialization, you need to use `rkyv::archived_root` to transmute a buffer into an `ArchivedKdTree`. For `ArchivedKdTree` to be useful, it actually needs some methods though! v2.1.0 refactors the query code so that the method bodies of the queries are templated by macros, allowing them to be implemented on `KdTree` and `ArchivedKdTree` without completely duplicating the code. The updated rkyv example shows the difference that zero-copy usage of rkyv makes vs deserializing, as well as also showing the gains that can be made using mmap compared to standard file access. Combining both together results in absolutely mindblowing performance when measuring time-from-binary-start-to-first-query-result. See for yourself by downloading the sample datasets mentioned in the examples readme and running: ```sh cargo run --example rkyv --features=serialize_rkyv --release ``` On my machine, using the old technique of normal file access and deserialization into `KdTree`, the example code takes 348 milliseconds to load and query. The memmapped code that just transmutes to an `ArchivedKdTree` and then queries it takes 182 **micro** seconds(!) - an improvement by a factor of 1900x!! I'll follow up this release with equivalent methods for `Fixed`, and some more ergonomic methods for laoding and saving.


This PR was generated with release-plz.