A generational indexing-based Vector
This crates provides a vector type that uses generational indices to access its elements. The addition of a generation counter to an index allows for invalidation of stale references to previously deleted vector entries.
The vector itself is backed by a free list to keep track of reusable holes after element removal.
use ;
The above script is taken from examples/example.rs and can be run using
cargo run --example example
You can find more usage examples in tests/tests.rs.
Crate features
smallvec
: Enables the use ofSmallVec<T>
for the free list.tinyvec
: Enables the use ofTinyVec<T>
for the free list.
Benchmarks
This project uses Criterion for benchmarking. To execute the benchmarks, run
cargo criterion