C
cody
Why isn't there a LinkedList in .NET?
Was the reason that the mark&sweep GC algorithm has problems with heavily
linked data?
A LinkedList is very important is you have huge lists and append a new
element you just create this objekt and set a reference in contrast to an
arraylist where you have to copy the whole array and create a new one with
the double size.
Additionally removing elements in an ArrayList is a very expensive
operation: all elements behind the removed element has to be copied to fill
the hole. With LinkedList you just have to relink to element to remove
everything between them.
I was hoping that Whidbey would provide a LinkedList but I looked in the
beta and there was nothing.
So what are the reasons behind this decision?
Was the reason that the mark&sweep GC algorithm has problems with heavily
linked data?
A LinkedList is very important is you have huge lists and append a new
element you just create this objekt and set a reference in contrast to an
arraylist where you have to copy the whole array and create a new one with
the double size.
Additionally removing elements in an ArrayList is a very expensive
operation: all elements behind the removed element has to be copied to fill
the hole. With LinkedList you just have to relink to element to remove
everything between them.
I was hoping that Whidbey would provide a LinkedList but I looked in the
beta and there was nothing.
So what are the reasons behind this decision?