News for hackers. Stuff that matters.
Re:Factor is faster than Zig by otabdeveloper4 on Saturday November 11, 2023 @04:47AM (#38228843)
Linked lists are necessary when you have structures that can't be moved. Very important in a highly concurrent or lockfree environment.
Re:Factor is faster than Zig by iudqnolq on Saturday November 11, 2023 @05:41AM (#38229138)
How could you use the Rust standard library's linked list for that?
Re:Factor is faster than Zig by boxed on Saturday November 11, 2023 @05:32AM (#38229081)
Can't you have a list of pointers instead?
Re:Factor is faster than Zig by xgstation on Saturday November 11, 2023 @06:51AM (#38229507)
Resizing/deleting items in list in most implementations are either not lock free or not threadsafe
Re:Factor is faster than Zig by chmod775 on Saturday November 11, 2023 @08:30AM (#38230138)
Yeah, but what if you just use smaller lists and point to the next/previous list?

Hold on...

Re:Factor is faster than Zig by boxed on Monday November 13, 2023 @05:47AM (#38248880)
Linked lists aren't either so....?
Re:Factor is faster than Zig by KerrAvon on Saturday November 11, 2023 @10:32AM (#38231182)
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.
Re:Factor is faster than Zig by otabdeveloper4 on Saturday November 11, 2023 @01:25PM (#38233000)
A deque is a doubly-linked list under the hood.
Re:Factor is faster than Zig by adgjlsfhk1 on Saturday November 11, 2023 @08:22PM (#38236344)
Array based deques are very common (and usually much faster). Doubly linked lists are absolutely awful for memory locality.