Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
otabdeveloper4
on Nov 11, 2023
|
parent
|
context
|
favorite
| on:
Hashmaps in Factor are faster than in Zig
Linked lists are necessary when you have structures that can't be moved. Very important in a highly concurrent or lockfree environment.
iudqnolq
on Nov 11, 2023
|
next
[–]
How could you use the
Rust standard library's
linked list for that?
KerrAvon
on Nov 11, 2023
|
prev
|
next
[–]
A deque will usually work just as well in that environment and it will always have better general performance characteristics. There are very few legitimate uses of linked lists.
otabdeveloper4
on Nov 11, 2023
|
parent
|
next
[–]
A deque is a doubly-linked list under the hood.
adgjlsfhk1
on Nov 12, 2023
|
root
|
parent
|
next
[–]
Array based deques are very common (and usually much faster). Doubly linked lists are absolutely awful for memory locality.
boxed
on Nov 11, 2023
|
prev
[–]
Can't you have a list of pointers instead?
xgstation
on Nov 11, 2023
|
parent
[–]
Resizing/deleting items in list in most implementations are either not lock free or not threadsafe
chmod775
on Nov 11, 2023
|
root
|
parent
|
next
[–]
Yeah, but what if you just use smaller lists and point to the next/previous list?
Hold on...
boxed
on Nov 13, 2023
|
root
|
parent
|
prev
[–]
Linked lists aren't either so....?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: