Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, with less runtime overhead, so long as you're ok with the ~4kB minimum allocation size.


I think optimal would be just normal vector under 4 kB and then switch to whole pages after that.

Do any vector implementations & allocators actually do this though?


You lose the in-place resize property if you don't start with an entire page.

As far as "has anyone implemented this?" -- I don't know.


Yeah but it probably makes little difference if your vector is under 4 kB anyway.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: