Re: PATCH: Next 5291 speedup

From: e98cuenc@free.fr
Date: Thu Oct 02 2003 - 09:23:31 EDT

  • Next message: Mark Gilbert: "Re: Commit: 5829"

    Hi,

    I'm sorry, but I've not followed all the details of this problem.

    Replying to your question about the UT_Set:
    (of course, if the strings have some associated data, you should use UT_Map)

    >- inserting objects with duplicate keys

    it acts, AFAIR, like a std::multiset. You will end having two times
    the "same" (as far as your comparation function can tell) key on the tree.

    >- finding all objects containing a specific key.

    do a search with your key. Do ::next() until you end with a key different
    from the original one.

    I don't really remember if find should always give the left-most key on the
    tree that matches your searched key. If it doesn't do it, then just look
    the ::prev()'ious keys until you find a different one, and then look for
    the ::next() keys.

    Btw, I've absolutely lost track of the problem trying to be solved. What's
    the goal? To store a set of unique strings and retrieve them as fast of
    possible? What's the current solution? A vector that's being qsort'ed after
    each insert operation?

    Sorry if I'm absolutely out of track, here. Your improvements looks very
    impressive!

    Cheers,



    This archive was generated by hypermail 2.1.4 : Thu Oct 02 2003 - 15:00:13 EDT