Comparative Performance of the AVL Tree and Three Variants of the Red-Black Tree (2406.05162v21)
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.