Releases: orxfun/orx-split-vec
Releases · orxfun/orx-split-vec
`get_ptr_mut` and useful `From` implementations
prelude
module is removed. Insteadpub use orx_pinned_vec::PinnedVec;
is added for convenience.- unsafe
get_ptr_mut
pinned vec method is implemented. This method has a defaultGrowth
implementation; additionally, a more efficient constant timeGrowthWithConstantTimeAccess
implementation. - test coverage is improved.
SplitVec
of anyGrowth
, as well as standardVec
, can now be converted into a split vector withRecursive
growth with no cost.- Conversion from
SplitVec
toVec
is now free provided that the split vector contains only one fragment. slice
andtry_get_slice
methods now accept any range.
`contains_reference` & `set_len` pinned-vec methods with `ptr_mut`
PinnedVec::contains_reference
method is implemented forSplitVec
.GrowthWithConstantTimeAccess
trait is defined. Note that every type implementing this trait also implementsGrowth
. In other words, this is a special growth case. In addition, it provides the functionget_fragment_and_inner_indices_unchecked
which returns fragment and within-fragment indices without requiring the current state of the vector using constant time access function.ptr_mut
method is implemented for split vectors having a constant time access growth strategy. This method is unsafe in the sense that it allows reading from or writing to uninitialized memory. On the other hand, it is safe against access violation, it only returns a memory location owned by the split vector.- unsafe
set_len
method is implemented.
major pinned-vec 2.0.0 revision
SplitVec
implements "orx_pinned_vec::PinnedVec" version 2.0.- pinned elements guarantee is formalized and documented,
- unsafe methods such as
clone
orinsert
are now safe. pinned vector on its own cannot build inter-element references; hence, these methods are not unsafe. this responsibility is passed to the struct enabling these references, namely, orx_selfref_col. - in addition to being a marker trait, this crate now provides
test_pinned_vec
function which is essential in asserting that a pinned vector implementation satisfies the required guarantees.
Clone
is implemented.Debug
is implemented.- Index-free iterator and reverse iterator implementations.
Recursive growth strategy
Recursive
growth strategy is defined and implemented.- Benchmarks extended by including the
Recursive
strategy and adding theappend
benchmark. IntoFragments
trait is defined to allow overloading inappend
function.- Documentation is updated accordingly.
orx_pinned_vec version 1.0
orx_pinned_vec
version 1.0
Updated the orx_pinned_vec
dependency to version 1.0. Note that this version finalizes the orx_pinned_vec::self_referential_elements
module.
Also
FromIterator
is implemented forG: Growth + Default
. Growth strategies implemented in this crate (Doubling
andLinear
) satisfy this trait bound.iter
performance is further optimized by allowing the first branch to be the correct one in almost all the time.iter_mut
is implemented.
Dependency Removed orx_fixed_vec
Dependency to orx_fixed_vec::FixedVec
is removed. This is due to the fact that split vector performs as well as the standard vec after the performance optimizations, currently making fixed-vec not necessary.
Performance Optimizations Benches
- The error in benchmarks has been fixed.
- Benchmarks are extended to include serial access.
- The runs are repeated. Currently, the gap between split vector and standard vector seems to have diminished.
- Documentation is revised accordingly.
Performance Optimizations
Random access for Linear
and Doubling
split vectors are optimized.
Iterators are revisited, revised and a slight performance improvement is provided.
Exponential
growth variant is removed as it adds complexity while it does not bring sufficient benefits. However, custom growth implementations are still possible.
Benchmarks are implemented.
Benchmark results are reported.