3 ms·
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
by bouncycastle 5y 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.
- dilyevsky 5y agoThey also have absolutely terrible performance due to poor cache locality and putting pressure on GC
- bouncycastle 5y agoSource?
- mseepgood 5y agoCS201
- bouncycastle 5y agoOk genius, explain how exactly what the OP meant?
- puddingforears 5y agoThey make a great stack, though. Cheap to use and easy to implement.
- snovv_crash 5y agoUse a deque at least and amortize the heap allocations...
- puddingforears 5y agoWith generics I could justify the extra engineering work to make such a deque!
- deleted 5y ago[deleted]
- pjmlp 5y agoThere are many ways to implement a list, including backed by arrays. That is what those CS algorithm and data structures lectures are for.