|
Boost : |
Subject: Re: [boost] [B-tree] Continuing development
From: Beman Dawes (bdawes_at_[hidden])
Date: 2010-09-24 15:29:33
On Tue, Sep 21, 2010 at 1:17 AM, Cory Nelson <phrosty_at_[hidden]> wrote:
> On Mon, Sep 20, 2010 at 9:01 AM, Beman Dawes <bdawes_at_[hidden]> wrote:
> > * Please give the library a try. I need feedback based on actual use.
> >
>
> Thanks Beman, I'll give it a try. I don't know how much real-world
> use I can actually give it without variable-length keys/datalooking
> forward to that.
>
I'm going to attack variable-length keys/data in several steps.
1) Via a very simple string class that has a fixed maximum length, and has a
sizeof() that maximum length + 1. Although this wouldn't be suitable for
really demanding applications, it should be fine for a lot of every day
programming. It is totally non-invasive, so is available right now. See
http://github.com/Beman/Boost-Btree/blob/master/boost/btree/detail/fixstr.hpp,
or use your own if you've already got such an animal.
Steps two and three are invasive to the btree, so require the btree class
have some form of trait, mix-in, or policy mechanism.
2) Variable length keys and data using the current disk page layout. That's
fairly easy to program, but isn't as fast as the step 3 approach. I've used
this technique in the past with excellent results.
3) Variable length keys and data using variable length key/data friendly
disk page layout. More difficult to program, but will offer better space,
speed, or both depending on the exact app. I've never used this technique,
so it may be a bit of a learning experience.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk