Skip to content

Releases: Cydhra/vers

Constructors, Iterators, and Convenience

09 Jul 20:34
Compare
Choose a tag to compare

New Features

  • RsVec implements several comparison methods (sparse_equals, full_equals), as well as the PartialEq trait which dynamically switches between those implementations according to my benchmark results.
  • BitVec and RsVec implement new constructors. Take a look at docs.rs to see what's possible now!
  • BitVec, BinaryRmq, and FastRmq can be created from u64 Iterators.
  • Several constructors are also available as From<T> implementations now
  • Added the simd crate-feature which gates some (unsafe) vectorization in RsVec, and a vectorized alternative iterator (RsVec::bit_set_iter0, RsVec::bit_set_iter1)
  • RsVec::iter1 and RsVec::iter0 now also have an owning version: RsVec::into_iter1
  • RsVec::iter1 and RsVec::iter0 are now double-ended iterators

Improvements

  • Added several examples to the documentation of BitVec
  • Iterating an Elias-Fano Vector is about 20% faster now
  • FastRMQ is 3-4% faster on vectors that fit in L3

Fixes

  • BitVec::get_bits and RsVec::get_bits could fail when querying 64 bits from an index not aligned to the vector limbs

Another bug in select iterators removed by simplification

28 Jun 20:05
Compare
Choose a tag to compare

The select iterators failed under certain conditions because they attempted to select bits from the limb that contained the last returned element, even if that limb does not contain any more set bits. This happened because the iterator forgot to account for popcounts in limbs preceding the current limb. The iterator now no longer keeps track of which limb contained the last selected bit, since searching the limb every time is essentially free due to caching effects.
Searching it every time forces the iterator to keep track of all bits, even if they are spread across multiple limbs in a block.

Bugfix in select-1 iterator

25 Jun 18:21
Compare
Choose a tag to compare

Fixed Issue #6

  • the select1 iterator (iter1) could fail on bit vectors with more than one super-block because the number of ones in super-blocks was calculated wrongly while iterating

Replaced extant intrinsics with util function

11 Apr 23:33
Compare
Choose a tag to compare

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

11 Apr 00:39
Compare
Choose a tag to compare

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

02 Mar 15:00
Compare
Choose a tag to compare

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

02 Mar 14:43
Compare
Choose a tag to compare

Changes

  • added mask_* functions to vers::BitVector which apply lazily-evaluated masks onto a bitvector.
  • added apply_mask_* functions to vers::BitVector to update the bit vector in-place.
  • added count_ones and count_zeros functions to vers::BitVector and masked bit vectors.
  • added set_bit function to vers::BitVector.
  • added Eq and Hash traits to vers::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 in vers::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 for rsdict in benchmarks, since it depends on packed_simd which is currently not compiling

Fixed undefined behavior and updated documentation

20 Oct 20:27
Compare
Choose a tag to compare
  • Due to the conservative use of unsafe, the library technically produced undefined behavior on target platforms that do not support POPCNT or BMI2. 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

16 Sep 16:13
Compare
Choose a tag to compare

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

05 Sep 17:36
Compare
Choose a tag to compare

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 to predecessor_unchecked and analogous for succ
  • changed behavior of Elias-Fano pred and succ to be more rusty: Options instead of sentinel values are returned
  • added get_bits method to rs-vectors as well