The CB tree: a practical concurrent self-adjusting search tree

Yehuda Afek, Haim Kaplan, Boris Korenfeld, Adam Morrison, Robert Endre Tarjan

Abstract

We present the CB tree, a counting-based self-adjusting binary search tree in which, as in splay trees, more-frequently accessed items move closer to the root. In a sequential execution, after $$m$$ m operations of which $$c(v)$$ c ( v ) access item $$v$$ v , an access of $$v$$ v traverses a path of length $$\mathcal {O}\left( 1 + \log \frac{m}{c(v)}\right) $$ O 1 + log m c ( v ) while doing few if any rotations. Unlike the original splay tree, in which each access moves the accessed item all the way to the root via a sequence of rotations, accesses in a CB tree do very few rotations, specifically $$\mathcal {O}\left( n + n\log \frac{m}{n}\right) $$ O n + n log m n , during a sequence of $$m$$ m operations of which $$n$$ n are insertions. This is $$o(1)$$ o ( 1 ) (subconstant) amortized per operation if $$m \gg n$$ m ≫ n . We adapt the CB tree into a scalable concurrent self-adjusting BST. We show experimentally that the concurrent CB tree scales well because it, too, performs few rotations, and therefore self-adjusts without having rotations create a bottleneck. Our evaluation shows that the concurrent CB tree performs better than existing concurrent search trees on non-uniform access sequences derived from real workloads.
BibTeX
@article{afek2014cb,
  author = {Yehuda Afek and Haim Kaplan and Boris Korenfeld and Adam Morrison and Robert Endre Tarjan},
  title = {{The CB tree: a practical concurrent self-adjusting search tree}},
  journal = {Distributed Comput.},
  year = {2014},
  doi = {10.1007/s00446-014-0229-0},
}

Loading related content...

Figure