News for hackers. Stuff that matters.
Re:Drop millions of allocations by using a linked list (2015) by jasode on Friday March 12, 2021 @10:24AM (#26436769)
>, you need a O(1) memcpy

I didn't downvote your comments but memcpy is O(n) instead of O(1) : https://stackoverflow.com/questions/362760/how-do-realloc-an...

I'll delete this reply if you meant something else.

Re:Drop millions of allocations by using a linked list (2015) by dragontamer on Friday March 12, 2021 @10:28AM (#26436810)
Ah jeez. That's what I get for typing fast.

Yeah, I mean O(1) insert / remove for linked lists, and O(n) memcpys (most array insert / remove operations)

EDIT: I've edited my post above. I think its correct now. Thanks for pointing out the error.