News for hackers. Stuff that matters.
Re:Don’t blindly prefer emplace_back to push_back by eru on Thursday March 04, 2021 @08:02AM (#26341787)
Linked lists are great when you want a fully persistent data structure version of a stack. (https://en.wikipedia.org/wiki/Persistent_data_structure)

If you don't need persistence, you can often use a dynamic array to do basically everything a linked list can do for you, but most of it faster.

Also, if you have a relocating garbage collector, or otherwise a smart enough compiler (or interpreter), linked lists can become sufficiently efficient.

There are no comments on this comment yet.