[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
AVL -> T-trees
- To: OpenLDAP Devel <openldap-devel@openldap.org>
- Subject: AVL -> T-trees
- From: Howard Chu <hyc@symas.com>
- Date: Mon, 02 Jun 2008 09:49:16 -0700
- User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.9pre) Gecko/2008043023 SeaMonkey/2.0a1pre
Taking a cue from our MySQL friends - MySQL uses T-trees for their in-memory
structures. These are balanced trees, like AVL trees. But instead of just one
data item per tree node, they have N items per node. (Presumably N is a
compile-time constant.) The advantage to using T-trees is that inserts and
deletes have less impact on the overall tree, thus minimizing the need for
rebalancing.
I would expect that they perform about as well as AVL trees for lookups.
Anyone interested in experimenting here and reporting on the relative performance?
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/