orxfun / orx-split-vec

An efficient constant access time vector with dynamic capacity and pinned elements.
https://crates.io/crates/orx-split-vec
MIT License
2 stars 2 forks source link

slices and initialized grow #40

Closed orxfun closed 4 months ago

orxfun commented 4 months ago

Two slice returning methods are introduced. These methods are important in performant critical applications which allows to directly benefit from slice optimizations.

A concurrently safe growth method method grow_and_initialize is introduced. This methods performs capacity growth and length growth at the same time making sure that all elements are initialized with valid values.

Also unsafe get_ptr_mut_and_indices method is implemented.

Test methods are extended accordingly.