Releases: Cydhra/vers
Improve Inlining Defaults
Bugfixes
- This patch changes the lookup tables for BP trees from
consttostaticto prevent automatic inlining. This does not change any runtime behavior, but simplifies LTO of downstream crates, shortens compile time of tests, benchmarks, and possibly the crate itself, and potentially improves the binary size.
Fix documentation issues
Bugfixes
rustdocremoved thedoc_auto_cfgfeature which broke the rustdoc pipeline- Fixed several broken doclinks
SIMD Stabilization
The SIMD feature is now stable
Since Rust 1.89.0 stabilized AVX-512, the simd feature no longer requires nightly rust. The feature can now be used on the stable channel for speedups in select, and faster iterators over set bits.
This bumps the MSRV to 1.89.0.
Bugfixes
Due to internal changes to the BitVec and RsVec implementations in version 1.6.3, the Hash implementation no longer fulfilled its invariant with regards to the PartialEq implementation. This is fixed now with a custom implementation of the hashing function.
Quality Of Life
Improvements
- Merged Quality-of-life API improvements. by @arnsholt in #32
- Conversions between
BitVec,RsVec, and various data structures to allow modification of these through back-conversion and regeneration BitVec::split_atto split a bit vector into twoBitVec::extend_bitvecandExtend<BitVec>implementation forBitVecto append bit vectors to existing vectors
- Conversions between
New Contributors
1.6.3 Minor Space and Runtime Improvements
Improvements
- removed unnecessary padding at the end of
RsVecinstances. This padding previously added a constant amount of 0 values to the vector, which were entirely unused and served no purpose. It was a leftover from a previous experimental SIMD implementation. - Reduced the code path branching in
BitVec::get_bits(i, n)andRsVec::get_bits(i, n)(and the unchecked versions), improving the performance of most operations ofBpTreeand some ofEliasFanoby 5-6%
1.6.2 BP serde Support
Added support for serde for the BP structures. This has not been done previously to accomodate changes to the search routines BP builds upon under the hood, but I postponed these changes for a future major update.
1.6.1 BitVector padding bug
Bugfixes
- When a
BitVeccontained non-zero bits in the last limb that were not part of the Vector, either due to usingappend_bitwith extra bits, or by dropping bits from the vector,RsVec::from_bit_vecmiscounted the amount of zeros.
Succinct Trees
Balanced Parentheses Trees
The crate has a new data structure: Succinct trees using the well-known BP representation.
- The tree supports tree navigation to parent, children, and siblings, as well as
subtree_sizeandis_ancestorinO(log n) - Further, it supports level-tree navigation (i.e. navigation in level-order), also in
O(log n) - It supports fast depth-first postorder iteration of the entire tree, or individual subtrees.
- It exposes the usual internal BP helper functions
open,close,enclose, and evenfwd_searchandbwd_search. - It is written to support unbalanced parenthesis expressions without panicking on the navigation functions (iterators excluded).
Sparse RsVec
And another new data structure: A sparse bit vector which supports rank1, select1, and rank0 (among the usual convenience features).
It is a thin wrapper around an Elias-Fano vector.
It can be efficiently constructed from a collection of indices of set bits, or from an existing BitVec.
New APIs
Elias Fano
- Added a
rank(i)andselect(i)function (the latter being an alias forget(i)) - Added a
delta(i)function, which returns the delta between entriesi - 1andi. - Elias Fano construction is a bit over 5% faster
Bit Vectors
- Added a function
append_bits_uncheckedwhich leaves out some housekeeping thatappend_bitnormally does. - Added a function
unpack_bits(i, n)as a convenient counterpart to thepack_sequence_*constructors. It is an alias forget_bits(i * n, n), and it has an unchecked version too.
Other Fixes
- small correction in the documentation for rank and select, clarifying the invariant.
1.5.1 - Wavelet Matrix Serde Support
What's Changed
- remove redundant bits_per_element, reducing
WaveletMatrixstruct size by @somethingelseentirely in #12 - add serde support to
WaveletMatrix
New Contributors
- @somethingelseentirely made their first contribution in #11
1.5.0
New Features
- Vers now implements a
WaveletMatrixto encode arbitrary alphabets. The implementation supports alphabets exceeding 64 bits, but its API works with primitive integers all the same. - The Wavelet Matrix supports rank and select queries, predecessor and successor queries, and statistical queries (like range-max, range-min, range-median, range-select-k, ...), and reconstruction of values all in
O(k)wherekis the alphabet bit size. - The Wavelet Matrix supports several iterators over its encoded sequence, including a sorted iterator.