Damus
Tom Forsyth profile picture
Tom Forsyth
@Tom Forsyth
It's funny that algo folks still like to talk about linked lists. But these days we avoid them like the plague because they thrash caches and prefetchers.

In the 16-bit era, we didn't have either of those things, so linked lists made a decent amount of sense.

But it's been 30 years! Re-evaluate!
2
LR · 2w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqykddq7nmfd8cd0hupl8fnsmmuhtg55zusm6de4fjecmrhsx4x97qx8hm63 i use a tiny temporary linked list for a shared heap pointer destructor stack, but it's hardly relevant for performance.
slembcke · 2w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqykddq7nmfd8cd0hupl8fnsmmuhtg55zusm6de4fjecmrhsx4x97qx8hm63 Well, yes but also no. I use them all the time for “cold” lists that get iterated once or rarely, or advance one item and then wait. You can also mitigate a lot of that sticking the...