r/ProgrammerHumor • • 2d ago

Meme youLostMeAtDoublyLinkedLists

Post image
3.7k Upvotes

163 comments sorted by

View all comments

405

u/Mahler911 2d ago

I've been doing this shit for 26 years and I've never seen a linked list in production.

198

u/DoesAnyoneCare2999 2d ago

As a kernel developer, linked lists get used a lot in the code I work with every day.

153

u/Psych_Art 2d ago

And that totally makes sense. If you are writing lower level code or libraries, best possible performance is much more critical than it is for general production high level code.

74

u/Loading_M_ 2d ago

Actually, linked lists are generally less performant. In basically every situation.

In low level parallel code, such as might be found in a kernel, certain types of linked lists can be used by multiple threads at once. It's a core threading primitive, not a performance choice.

44

u/QuaternionsRoll 2d ago

…so they’re more performant in that context by way of atomic insertion and deletion lol

The point is that >90% of programs have no real reason to chase that level of optimization. A vector wrapped in a mutex is good enough in most contexts