Y
Hacker News
new
|
ask
|
show
|
jobs
by
bouncycastle
1928 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
dilyevsky
1928 days ago
They also have absolutely terrible performance due to poor cache locality and putting pressure on GC
link
pjmlp
1927 days ago
There are many ways to implement a list, including backed by arrays.
That is what those CS algorithm and data structures lectures are for.
link
puddingforears
1928 days ago
They make a great stack, though. Cheap to use and easy to implement.
link
snovv_crash
1928 days ago
Use a deque at least and amortize the heap allocations...
link
puddingforears
1927 days ago
With generics I could justify the extra engineering work to make such a deque!
link
bouncycastle
1928 days ago
Source?
link
mseepgood
1928 days ago
CS201
link
bouncycastle
1926 days ago
Ok genius, explain how exactly what the OP meant?
link