in reply to Re (tilly) 2: (corrections) Re: Answer: Efficient access to sparse lists?
in thread Efficient access to sparse lists?

FYI, since this problem does not require sorted inserts into the middle of the list, a BTree is overkill. A hashed linked list is hugely simpler and probably faster for most operations.

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re2: (corrections) Re: Answer: Efficient access to sparse lists?

Replies are listed 'Best First'.
Re (tilly) 3: (corrections) Re: Answer: Efficient access to sparse lists?
by tilly (Archbishop) on Jan 30, 2001 at 21:30 UTC
    I am not convinced that the problem does not require inserts in sorted position. Whether or not that was envisioned was not said, but my address books have names added randomly, and I expect them back in order. A BTree is definitely the right structure for that expectation.

    I would have to bench both ways for speed, but to get the full functionality that a BTree offers (most of which is very well suited to address books) with hand-rolled Perl will wind up being more complex than loading a widely used and well-optimized standard library.

    Sure, a linked list is easier to roll by hand. But it is easier still to not roll by hand at all...

      Uh, tilly, wrong thread. This thread is talking about a turn-based game, not an address book.

              - tye (but my friends call me "Tye")
        Erk. You are right that I read the description from the wrong thread. I must have borrowed some of the cheap crack that boo_radley was just talking about.

        OTOH when I read Efficient access to sparse lists? I see the phrase "numbered insertions" which suggests insertions into the middle of an ordered structure...