Releases: Cydhra/vers
Replaced extant intrinsics with util function
Hotfix patch
- Fix: The pdep fallback wasn't implemented in FastRMQ, which meant the crate would not compile outside of x86_64 targets.
- Fix: The documentation still stated that the intrinsics were forcibly enabled (which they were due to the previous bug, but now they aren't).
- General touch-up of the documentation
Fallback implementations for non-x86 platforms
This release provides fallbacks for the pdep intrinsic, which removes the necessity for the BMI2 feature.
Obviously, the crate is pretty slow without BMI2, but it can now theoretically be used on all platforms.
I also included a small benchmark for space overhead, and I am happy to report that Vers crushes its competitors in this regard.
Changed parameters for docs.rs
This release changes nothing but remove a space from an argument given to docs.rs for building documentation, because docs.rs is terrible at parsing CLI args apparently.
Added new API to vers::BitVec
Changes
- added
mask_*
functions tovers::BitVector
which apply lazily-evaluated masks onto a bitvector. - added
apply_mask_*
functions tovers::BitVector
to update the bit vector in-place. - added
count_ones
andcount_zeros
functions tovers::BitVector
and masked bit vectors. - added
set_bit
function tovers::BitVector
. - added
Eq
andHash
traits tovers::BitVector
. It's probably not a great idea to use large bit vectors as keys to a hashmap. - added iterators over 1 and 0 to
vers::RsVec
to iterate quickly over (the indices of) ones and zeros, exploiting the select data structure.
Fixes
get_bits
invers::BitVector
could panic when queried for 0 bits.- added compiler flags for docs.rs so the documentation should no longer fail building
For developers
- disabled
simd
forrsdict
in benchmarks, since it depends onpacked_simd
which is currently not compiling
Fixed undefined behavior and updated documentation
- Due to the conservative use of
unsafe
, the library technically produced undefined behavior on target platforms that do not supportPOPCNT
orBMI2
. This has been fixed by failing compilation if either is not present - Documentation stated that some behavior was undefined when it was just unpredictable but well-defined. Those issues have been fixed
- Fixed a bug that would lead to undefined behavior in release mode and crash in debug mode, where a shift operation with a modulus of 64 was possible
Technically, none of these changes should be breaking, since they only affect undefined behavior
Also, I added sucds
as a new crate in comparison benchmarks, which is faster in general, but much worse in worst-cases.
Stabilizing to 1.0.0
This release finally stabilizes the API and library status to 1.0.0. No API changes occurred since 0.0.3.
Changelog:
- minor corrections in documentation
Better std API integration, small changes to EF
Changelog:
- bit vectors implement iterators now
- all iterators also implement
ExactSizeIterator
- all iterators also implement
FusedIterator
- fixed panic in empty iterators
- Breaking: renamed Elias-Fano
pred
topredecessor_unchecked
and analogous forsucc
- changed behavior of Elias-Fano
pred
andsucc
to be more rusty: Options instead of sentinel values are returned - added
get_bits
method to rs-vectors as well
finalizing before 1.0
Changelog:
- Elias-Fano implements an Iterator
- Elias-Fano implements
succ
now, analogous topred
- Breaking: downgraded the constructor for Elias Fano to accepting slices, since there is no reason to limit it to
Vec
- Breaking: renamed a bunch of functions to be more in line with Rust naming conventions
- Breaking: deleted obsolete builder interface for
RsVec
, sinceBitVec
can be used for that with more features - Range Minimum Query structures implement
Deref
to expose their underlyingVec
- functions validate inputs
- Breaking: added checked versions to most functions, unchecked functions got renamed
- added convenience functions where applicable
- added examples to documentation
- fixed two bugs in
BitVec
that happened when truncating and appending data
0.1.0 - initial release
- static bit-vectors with and without constant-time rank and expected constant-time select
- elias fano coding of monotone sequences with expected constant time predecessor queries
- range minimum queries in constant time