mbrubeck / mediumvec

Rust collections optimized for size
Apache License 2.0
11 stars 5 forks source link

Implement a Vec-like collection that stores length and capacity on the heap #4

Closed mbrubeck closed 5 years ago

mbrubeck commented 7 years ago

Add a single-pointer-width vector type that stores its length and capacity as part of the same heap allocation as its buffer.

mbrubeck commented 7 years ago

https://github.com/Gankro/thin-vec does this using the unstable liballoc crate. It would be nice to have a stable version too, but handling alignment is much more annoying without liballoc.