Abstract

AbstractMuch has been said in praise of self‐adjusting data structures, particularly self‐adjusting binary search trees. Self‐adjusting trees are most suited to skewed key‐access distributions as the techniques attempt to place the most commonly accessed keys near the root of the tree. Theoretical bounds on worst‐case and amortized performance (i.e. performance over a sequence of operations) have been derived which compare well with those for optimal binary search trees. In this paper, we compare the performance of three different techniques for self‐adjusting trees with that of AVL and random binary search trees. Comparisons are made for various tree sizes, levels of key‐access‐frequency skewness and ratios of insertions and deletions to searches. The results show that, because of the high cost of maintaining self‐adjusting trees, in almost all cases the AVL tree outperforms all the self‐adjusting trees and in many cases even a random binary search tree has better performance, in terms of CPU time, than any of the self‐adjusting trees. Self‐adjusting trees seem to perform best in a highly dynamic environment, contrary to intuition.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call