logoalt Hacker News

speedstyletoday at 1:41 AM0 repliesview on HN

realloc is frequently O(n), ie CPython can avoid copying and immediately collecting the object but still copy the bytes. It's the same as calling reserve in a loop