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

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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: