Remix.run Logo
torginus 2 days ago

>What are skiplists good for

In practice, I have found out, nothing much. Their appeal comes from being simpler to implement than self-balancing trees, while claiming to offer the same performance.

But they completely lack a mechanism for rebalancing, and are incredibly pointer heavy (in this implementation at least), and inserts/deletes can involve an ungodly amount of pointer patching.

While I think there are some append-heavy access patterns where it can come up on top, I have found that the gap between using a BST, a hashtable, or just putting stuff in an array and just sorting it when needed is very small.

senderista a day ago | parent | next [-]

Lock-free BSTs or b-trees exist only in research papers, but lock-free skiplists are straightforward to implement.

zelphirkalt 12 hours ago | parent [-]

Mainly functional paradigm languages disagree with this.

CyberDildonics 2 days ago | parent | prev [-]

You're right, but it's not popular to go against the premise of a post.