Re: Hash tables

From: Måns Rullgård (mru_at_inprovide.com)
Date: 03/30/05

  • Next message: ronghuazhang_at_gmail.com: "use LD_PRELOAD with Java VM"
    Date: Wed, 30 Mar 2005 05:23:44 +0200
    
    

    Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:

    > Måns Rullgård wrote:
    >> Fletcher Glenn <fletcher@removethisfoglight.com> writes:
    >>
    >>>Russell Shaw wrote:
    >>>
    >>>>Hi, I made a hash table that usually holds less than 1000 entries,
    >>>>and the keys are text strings of 5-10 characters. Would a decent
    >>>>hash function be to just generate a 10 bit remainder by feeding the
    >>>>text into a 10 bit shift register which does a crc long division on
    >>>>it, then using that to index a 1024 entry array? (i'll use a
    >>>>maximal length generator polynomial)
    >>>
    >>>Have you tried looking at the man page for hcreate(3c)?
    >> Don't look there. Those functions are too bizarre to be used for
    >> anything, and are not even portable. You're much better off writing
    >> your own hash tables, or using somebody else's.
    >
    > The man page on my debian sid says they have a hard size limit.

    In glibc, the maximum number of entries is set by the argument to
    hcreate(). The standards do not prohibit an implementation from
    adjusting the size as needed.

    Another notable limitation is the absence of a delete function.

    -- 
    Måns Rullgård
    mru@inprovide.com
    

  • Next message: ronghuazhang_at_gmail.com: "use LD_PRELOAD with Java VM"

    Relevant Pages

    • Re: Dueling Tenors
      ... 'competition' with each other. ... This is about the most bizarre discussion I've read here, even by rmo ... standards. ...
      (rec.music.opera)
    • Re: Windows Ultimate Media Centre TV Setup
      ... But it appears that you have to use their software to changes the settings ... for Region and Standards. ... It seems bizarre that the OP should have been sold a computer with a hybrid DVB-T/analogue card when ... Live from the sunny Cote d'Azur ...
      (microsoft.public.windows.mediacenter)