From: "Gary Funck" <gary@intrepid.com>
To: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Cc: "Vishal Patil" <vishpat@gmail.com>
Subject: RE: Generic B-tree implementation
Date: Mon, 17 Jul 2006 21:27:55 -0700 [thread overview]
Message-ID: <JCEPIPKHCJGDMPOHDOIGIELCDFAA.gary@intrepid.com> (raw)
In-Reply-To: <4745278c0607171902pc218a9dn9c63dd6670ac7249@mail.gmail.com>
Vishal Patil wrote:
>
> I am attaching source files containing a very generic implementation
> of B-trees in C. The implementation corresponds to in memory B-Tree
> data structure. The B-tree library consists of two files, btree.h and
> btree.c. I am also attaching a sample program main.c which should
> hopefully make the use of the library clear.
Couple of thoughts:
1. red/black b-trees have superior worst case performance as it
relates to rebalancing, and the implementation doesn't add a
lot of complexity:
http://www.nist.gov/dads/HTML/redblack.html
2. Paul Vixie's b-tree implementation has been around since the mid-80's
or so, and simply from an historical perspective is worth a look
(comp.sources.unix anyone?):
http://www.isc.org/index.pl?/sources/devel/func/avl-subs-2.php
3. GCC uses 'splay trees' to good advantage:
http://www.nist.gov/dads/HTML/splaytree.html
which have the property that most-recently referenced nodes
tend to be higher up in the tree.
next prev parent reply other threads:[~2006-07-18 4:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-18 2:02 Generic B-tree implementation Vishal Patil
2006-07-18 2:58 ` Horst von Brand
2006-07-18 3:08 ` Vishal Patil
2006-07-18 3:20 ` Valdis.Kletnieks
2006-07-18 4:27 ` Gary Funck [this message]
2006-07-18 13:30 ` Vishal Patil
2006-07-18 15:00 ` Gary Funck
2006-07-18 15:13 ` Bob Copeland
2006-07-18 15:22 ` Vishal Patil
2006-07-19 7:33 ` Anton Altaparmakov
2006-07-19 13:34 ` Vishal Patil
2006-07-19 16:14 ` Andrea Arcangeli
2006-07-19 16:26 ` Vishal Patil
2006-08-07 2:18 ` Vishal Patil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=JCEPIPKHCJGDMPOHDOIGIELCDFAA.gary@intrepid.com \
--to=gary@intrepid.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vishpat@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.