Hacker News new | ask | show | jobs
by bouncycastle 1759 days ago
Singly linked lists are something from CS1 where you learn about data structures. You rarely use them in practice. In most cases slices and maps do the job fine.
1 comments

They also have absolutely terrible performance due to poor cache locality and putting pressure on GC
There are many ways to implement a list, including backed by arrays.

That is what those CS algorithm and data structures lectures are for.

They make a great stack, though. Cheap to use and easy to implement.
Use a deque at least and amortize the heap allocations...
With generics I could justify the extra engineering work to make such a deque!
Source?
CS201
Ok genius, explain how exactly what the OP meant?