Which Search Tree To Use

Hi friends,

: I have a file to process in which I have keys in pairs in a line like
: key1 key2 relation1
: where key1 and key2 are strings and relation is a double value. I may have up to 1 million lines and may have duplicate key lines like
: key1 key3 relation2
: key1 key2 relation1_1
: and goes on. Can some one tell me which kind of search tree (AVL, splay, ternary etc.) to use for maximum insertion and search speed.
: Reply to :
: keruru@turk.net

Comments

  • : Hi friends,
    :
    : : I have a file to process in which I have keys in pairs in a line like
    : : key1 key2 relation1
    : : where key1 and key2 are strings and relation is a double value. I may have up to 1 million lines and may have duplicate key lines like
    : : key1 key3 relation2
    : : key1 key2 relation1_1
    : : and goes on. Can some one tell me which kind of search tree (AVL, splay, ternary etc.) to use for maximum insertion and search speed.
    : : Reply to :
    : : keruru@turk.net
    :

    If insertion and search speed are the only the only criterion, then use some massive hash table (or maybe not so massive, I don't know how your keys can be conditioned).


    "We can't do nothing and think someone else will make it right."
    -Kyoto Now, Bad Religion

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion