You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the API mapped closer to std::Vec.
Methods like assume_init or set_len or the ability to use custom allocators are used in a project for which EcoVec is otherwise a perfect fit to reduce memory fragmentation.
The text was updated successfully, but these errors were encountered:
I'm open to exposing more low-level methods in principle. However, we need to be very careful in cases where ecow needs extra guarantees. Especially things like set_len which require the user to reason about the internal state of the Vec are a bit trickier since the EcoVec may perform clone-on-write, which for instance can change its capacity. Regarding the other mentioned one: I can't find an assume_init method for std::vec::Vec.
assume_init is part of MaybeUninit, more related to the Arc-like characteristics. I guess with set_len and by using the spare capacity you get equivalent dynamics as with assume_init in an uninitialized slice.
It would be nice if the API mapped closer to
std::Vec
.Methods like
assume_init
orset_len
or the ability to use custom allocators are used in a project for whichEcoVec
is otherwise a perfect fit to reduce memory fragmentation.The text was updated successfully, but these errors were encountered: