in reply to Re: Binary searching with Perl.
in thread Binary searching with Perl.

My inclination would still be to use DB_File or a relative to access a BTREE. One of the methods in the API is exactly equivalent to your search interface, but the implementation should be more performance-efficient. (And using their API takes less code.)

Replies are listed 'Best First'.
Re: Binary searching with Perl.
by Dominus (Parson) on May 25, 2003 at 04:55 UTC
    Says tilly:
    My inclination would still be to use DB_File or a relative to access a BTREE.
    That's a good solution in some cases, but not always. The world is full of sorted text files, and it doesn't always make sense to manufacture a much larger secondary file, which must be maintained in parallel with the text file, just to perform searches on the data.

    --
    Mark Dominus
    Perl Paraphernalia