I'm pretty surprised how many crappy LRUs there are implemented with an array instead of a doubly linked list o_O
@tqbf Ruby arrays... also removing elements from a even a C array sucks if you need to preserve order
-
-
@bascule You can amortize the cost by invalidating entries and then collecting every N deletes. -
@tqbf removing from a DLL is O(1) if you know the element's location ;) -
@bascule Yes, but having to seek around memory for individually allocated list nodes can hurt. I'm not arguing with you, though! -
@tqbf you can get the node to remove out of the hash
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.