2 ms·
It's fairly standard for a compacting GC to rearrange lists this way, because memory latency was a concern even back in the 80s. If you're using linked lists i
by Filligree 5y ago
It's fairly standard for a compacting GC to rearrange lists this way, because memory latency was a concern even back in the 80s.
If you're using linked lists in a language without a compacting GC, then you almost certainly want something else instead.
If you're using them in a language with one, then you still usually want something else, but at least the cost isn't as high. Also you might be using Haskell or something, where other constraints make data-structures like arrays painful to use.