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

If those CS students pay attention in their algorithms class, they'll learn that the amortized cost of insertions and removals at the end of a load-based resizable array is still constant anyway. As you say, the overhead of a malloc tremendously dominates a few instruction's worth of logic for capacity checks.


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

Search: