3 ms·
The Windows kernel also has linked lists as one of its few general-purpose data structures available to drivers. Like any tool, it has its place. As long as yo
by TillE 4y ago
The Windows kernel also has linked lists as one of its few general-purpose data structures available to drivers.
Like any tool, it has its place. As long as you're not traversing large linked lists, they're probably fine.
- dilyevsky 4y agoTraversing a short list but frequently still going to have terrible cache performance compared to something like vector. Just use vectors, folks
- deleted 4y ago[deleted]
- slaymaker1907 4y agoAllocating a huge chunk of memory all at once when the array grows can also cause a bunch of problems. Linked lists are also much simpler in a multi threaded context.
- dilyevsky 4y agoI’m not an expert in memory allocators but I suspect large allocation is better than many small allocs due to less fragmentation no? I’ll grant you the multithreaded case but if you’re doing that your cache performance is probably crap anyway =)