Why is performance better in LinkedList when the value of the reference type and its node are created at the same time?

These questions come from the MSDN page on LinkedList under the "Notes" section (fifth line).

Lists containing reference types work better when a node and its value are created at the same time. LinkedList accepts null as a valid Value property for reference types and allows duplicate values.

I searched for the source code and nothing stands out for me. Maybe this line was once true, but they just forgot about it? If not, why is this so?

+4
source share
1 answer

I assume this is due to the Locality of reference .

.NET , , LinkedListNode<T> RAM. node, , .

+5

Source: https://habr.com/ru/post/1686764/


All Articles