Closed jakoschiko closed 2 months ago
Another benefit: This would allow to make IntMap::new
const.
I don't work actively on this project anymore. If you want to fix you are welcome to. I can of course review your code when your done. Please avoid using unsafe code though :)
Hi!
Currently
IntMap::new
is allocating memory by default. EvenIntMap::with_capacity(0)
seems to allocate some memory.The collections of stdlib don't do this:
Vec::new
HashMap::new
BTreeMap
This is useful if the
IntMap<V>
has a high probability to remain empty. However, one can useOption<IntMap<V>>
as a workaround.Would it be feasible to change this?