News for hackers. Stuff that matters.
Re:The true cost of linked lists by chii on Monday June 06, 2022 @08:01AM (#31639375)
> A linked list element won't move once allocated.

only pertains to languages like C. In a virtual machine language like java, this isn't a property that can exist (there's no such thing as an address - at least as far as the language is concerned).

Re:The true cost of linked lists by ziml77 on Monday June 06, 2022 @08:28AM (#31639607)
A reference in Java can essentially be thought of as a pointer into a virtual address space. The JVM can move around the location of an object in the system's actual memory, but as far as anything holding reference is concerned nothing has changed.
Re:The true cost of linked lists by recursive on Monday June 06, 2022 @10:21AM (#31640859)
And a reference to an object that's in an array won't be invalidated if that object is moving around the array or even removed entirely. It's still a C concern.