From: Albert Wagner Date: 2002-08-07T22:46:28+09:00 Subject: Re: Assoc Class (Hash Pairs) On Tuesday 06 August 2002 07:02 pm, Charles Hixson wrote: > That sounds like a balanced tree to me. I think I saw a Ruby > implementation of an AVL tree, but you might consider just how much effort > you want to engage in. Personally, I wish that Ruby had a built-in B+Tree > implementation, or even an ISAM implementation, but when I look at the work > involved, I keep on putting off doing anything about it. I saw a B-Tree module in RAA. > > Still, if you've got a large file, then you might check out how SleepyCat > db looks. They provide a B+Tree based file and I'm pretty sure I saw an > interface to it in the RAA. It's disk based, so it's probably not worth it > for a small file, but if you have a file whose size is pushing memory > anyway, it might be your best choice. N.B.: They make provision for > accessing the data by record number, but they make no provision for > maintaining multiple keys, so if you need to do that, you'll probably need > to roll the interface yourself. Yes, bdb is cool.