Messages in this thread | | | Date | Tue, 25 Aug 1998 03:37:15 -0600 (MDT) | From | Colin Plumb <> | Subject | Re: Skip lists and splay trees |
| |
Jamie Lokier (lkd@tantalophile.demon.co.uk) wrote: > I would definitely recommend a skip list or splay tree. Both are very > fast. Both are very short code. (_Much_ shorter and simpler than the > AVL code was). > > The skip list has the advantage that it's fairly simple to code and > nothing is written (cache advantage). > > The splay tree has the advantage that it automatically caches the > recently used entries. So much so that there's no need for a one entry > cache in front of it.
Skip lists have the notable disadvantage that nodes are variable-sized (due to the random number of pointers in them), which complicates memory management, a great kernel preoccupation.
Splay trees are amenable to a number of heuristics like self-adjusting lists, like move-to-front or move-forward-one. They might be worth playing with a bit. -- -Colin
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |