[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Threaded AVL routines
- To: OpenLDAP Devel <openldap-devel@OpenLDAP.org>
- Subject: Threaded AVL routines
- From: Howard Chu <hyc@symas.com>
- Date: Wed, 21 Sep 2005 06:43:31 -0700
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050909 SeaMonkey/1.1a
I was digging into the AVL library to look for some other ways to speed
up back-hdb subtree searches. It seemed that threading the nodes might
help in hdb's IDL construction. Anyway, I've dusted off some old AVL
routines I wrote and added them to liblutil/tavl.c. It's worth noting
that this code uses iterative insert/delete functions, which are about
15% faster than the recursive code in avl.c. I haven't determined yet
whether threading will actually be useful here, but it may be worthwhile
to replace the insert/delete in avl.c with the iterative versions (with
or without the threading support). The traversal code is probably only
relevant for callers of avl_apply; there aren't many instances in the
source tree so it may not be any big deal.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/