Sujet : Re: Good hash for pointers
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 06. Jun 2024, 05:40:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86y17ilm4k.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Michael S <
already5chosen@yahoo.com> writes:
On Wed, 05 Jun 2024 08:58:46 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
I did get your own hash function out and put it into my little
test rig. There may be summary comments below.
>
<snip>
>
As you probably already paid attention, I like bottom lines.
What is a bottom line here?
The bottom line is both the multiply-by-a-large-prime hashes
should be avoided.
Did you you encounter cases in which almost-bonita's-but-not-quite
hash function performed badly?
Yes. A clear example is using directly mapped hash table that
has a power of two elements, with inputs all from malloc( 48 )
calls. All keys map to one of only 1024 entries, in a hash
table that has 65536 slots.