English

Comparative Performance of the AVL Tree and Three Variants of the Red-Black Tree

Data Structures and Algorithms 2025-08-06 v21

Abstract

This article compares the performance of the AVL tree to the performance of the bottom-up, top-down, and left-leaning red-black trees. The bottom-up red-black tree is faster than the AVL tree for insertion and deletion of randomly ordered keys. The AVL tree is faster than the bottom-up red-black tree for insertion but slower for deletion of consecutively ordered keys. The top-down red-black tree is faster than the bottom-up red-black tree for insertion but slower for deletion of randomly ordered keys, and slower for insertion and deletion of consecutively ordered keys. The left-leaning red-black tree is slower than the three other trees for insertion and deletion of randomly and consecutively ordered keys. An alternative deletion algorithm, which reduces the number of rebalancing operations required by deletion, is analyzed.

Keywords

Cite

@article{arxiv.2406.05162,
  title  = {Comparative Performance of the AVL Tree and Three Variants of the Red-Black Tree},
  author = {Russell A. Brown},
  journal= {arXiv preprint arXiv:2406.05162},
  year   = {2025}
}

Comments

21 pages, 8 figures, 6 tables