lkml.org 
[lkml]   [1998]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.021 / U:2.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site