Fast splay tree with order statistics. As fast as a linked list for insertion, deletion, and traversal, but much faster than a list for indexed access and running counts.
A self-balancing skip list: an ordered map/set whose node heights adapt to the access pattern, so frequently-used keys become cheaper to reach.
Hlsplaylist grammar for tree-sitter