Re: Hash tables
From: Måns Rullgård (mru_at_inprovide.com)
Date: 03/30/05
- Previous message: Russell Shaw: "Re: Hash tables"
- In reply to: Russell Shaw: "Re: Hash tables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Russell Shaw: "Re: Hash tables"
- In reply to: Russell Shaw: "Re: Hash tables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|