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

Empty vec should not allocate #16

Open orxfun opened 9 months ago

orxfun commented 9 months ago

Currently, SplitVec::new() or SplitVec created with other built-in growth strategies allocate the first fragment. Ideally, an empty vector must not allocate any fragments to avoid unnecessary heap allocation.