home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
- From: dave@cs.arizona.edu (Dave Schaumann)
- Newsgroups: comp.programming
- Subject: Re: Balanced Trees (Re: Why Are Red-Black Trees Obscure?)
- Message-ID: <1992Aug28.180854.14457@organpipe.uug.arizona.edu>
- Date: 28 Aug 92 18:08:54 GMT
- References: <1992Aug26.183817.7371@reed.edu> <1992Aug27.115551.7958@daimi.aau.dk> <PSU.92Aug27104235@ptero.cs.duke.edu> <1992Aug27.215924.24525@reed.edu> <neuhaus.715007061@vier>
- Sender: news@organpipe.uug.arizona.edu
- Reply-To: dave@cs.arizona.edu (Dave Schaumann)
- Organization: University of Arizona
- Lines: 29
- In-Reply-To: neuhaus@vier.informatik.uni-kl.de (Stephan Neuhaus (HiWi Mattern))
-
- In article <neuhaus.715007061@vier>, neuhaus@vier (Stephan Neuhaus (HiWi Mattern)) writes:
- >orpheus@reed.edu (P. Hawthorne) writes:
- >
- >> Has anyone used frequency of node access data to bias the tree balancing
- >>rotation operations toward shorter paths?
- >
- >Not quite, but I have used self-organizing linear lists in a program
- >that spent almost 90% of its time doing lookups, with startling
- >results.
- >
- [...]
- >1. When an element is successfully found in the list, move it to the
- >front of the list so that it may be found faster in subsequent
- >searches.
- >
- >2. When an element is successfully found in the list, exchange it
- >with its predecessor.
-
- >[...]I managed to get a speedup by a factor of 15 (roughly) for shallow
- >tries. [keys access probability had exponential distribution]
-
- It seems reasonable that this would also work well for equal probability
- of key access if you have a situation where the access of a key means it
- will likely be accessed again soon. (for example, variables in programs
- generally have this property: you have an access in the declaration, then
- several more accesses following as the variable is used.)
-
- --
- What signature?
-