-
Transparently optimise
iter_{set|unset}_bits(...).count()to use platform "count bits" directly, rather than forcing the full iterator to execute. Depending on your machine, this can lead to savings of 2-3 orders of magnitude. -
Implement
DoubleEndedIteratorandFusedIteratorforIter{Set|Unset}Bits.
- Add
unchecked_getandunchecked_set.
-
Drop support for Rust pre-1.37.
-
Add an optional bincode dependency, which can be used as an alternative to serde for encoding / decoding.
-
Use Criterion for internal benchmarking and add several benchmarks.
- Update dependencies.
- Add
from_elem_with_storage_typeas a dual ofnew_with_storage_type.
- Implement
std::ops::{BitOrAssign, BitOr, BitAndAssign, BitAnd, BitXorAssign, BitXor}. Note that, as withVob's other bit-wise operations, these will panic if the twoVobs in question are not of equal length.
-
Vob::from_elem(value: bool, len: usize)now takes the value first and the number of repetitions of that value second to mirror the most common way this function is defined elsewhere. -
The
vob!macro's repetition form now mirrorsvec!, sovob![val; len]is equivalent toVec::from_elem(val, len).
- Add
get_storageto theunsafe_internalsportion of the API. - Clearly document the invariants users must maintain when using the
unsafeparts of the API.
- Use rustfmt stable.
- Remove unnecessary
fn mainwrappers in doctest examples. - Clean up two remaining
#[macro use] extern crate vob;lines from examples.
- License as dual Apache-2.0/MIT (instead of a more complex, and little understood, triple license of Apache-2.0/MIT/UPL-1.0).
- Port to Rust 2018.
- Remove local copy of
Boundssince it is now part of stable Rust. - On rustc-1.37 and later, automatically use
reverse_bits(this automatically includes the current nightly version of rustc).
- Further speed up
iter_\[set|unset\]_bitsfor cases where set/unset bits are fairly randomly distributed (by approximately 10%).
- Substantially speed up
iter_\[set|unset\]_bitsfor the common case where all bits are set/unset (respectively). This leads to a 3x improvement in such cases, with no measurable slowdown in the general case.
- Change
setso that if passed an out of bounds index it panics (previously it returned None, but since one doesn't generally check the return value ofset, this led to errors being overlooked).
- Improve performance of the
xor,and, andorfunctions. - Add
fast_reversefeature: on nightly, we automatically try to use thefast_reversefunction to improve performance.
- Don't overallocate memory in
new_with_storage_type.
- Add
extend_from_vobfunction. - Add
unsafe_internalsfeature, which allows external crates unsafe access to Vob's internal (useful for speed, but bad for forwards compatibility!). - Various performance improvements.
- Use
rustfmt.
- Add
from_bytesfunction.
- Add
serdefeature to enable Serde support.
First stable release.