linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* AVL trees vs. Red-Black trees
@ 1999-11-27 12:59 Kevin O'Connor
  1999-11-28  2:57 ` Andrea Arcangeli
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin O'Connor @ 1999-11-27 12:59 UTC (permalink / raw)
  To: linux-mm

Hi,

I've been spending the last few days "kicking around" different ideas for
implementing reusable data structures in C.  That is, generic hash tables,
linked lists, trees, etc.

I was planning on hacking up a kernel with a generic tree implementation.
(Right now there are two AVL trees in the kernel - one in the MM code and a
copy in the net/bridge code.)

I was a little surprised to see that the MM code uses an AVL tree - my old
textbooks are of the opinion that Red-Black trees are superior.
Implementing the code to create a stack for performing "bottom-up"
insertions/deletions seems like a pain to me.  I would think the "top-down"
approach of a Red-Black tree would be more efficient and probably simpler
to implement.

So my question is, was there a particular reason AVL trees were chosen, or
would any balanced tree implementation suffice?

-Kevin

-- 
 ------------------------------------------------------------------------
 | Kevin O'Connor                     "BTW, IMHO we need a FAQ for      |
 | koconnor@cse.buffalo.edu            'IMHO', 'FAQ', 'BTW', etc. !"    |
 ------------------------------------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-11-30 14:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-27 12:59 AVL trees vs. Red-Black trees Kevin O'Connor
1999-11-28  2:57 ` Andrea Arcangeli
1999-11-28  5:29   ` Oliver Xymoron
1999-11-29 15:54     ` [patch] rbtrees [was Re: AVL trees vs. Red-Black trees] Andrea Arcangeli
1999-11-29 19:18       ` Manfred Spraul
1999-11-29 19:17         ` Andrea Arcangeli
1999-11-30  5:27         ` Kevin O'Connor
1999-11-30 14:14           ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox