Re: Good hash for pointers

Liste des GroupesRevenir à cl c 
Sujet : Re: Good hash for pointers
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.c
Date : 05. Jun 2024, 10:34:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240605123450.00003fdb@yahoo.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Wed, 5 Jun 2024 11:10:24 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:

Am 04.06.2024 um 23:59 schrieb Michael S:
 
18446744073709551557 is indeed very bad (too close to 2**64). 
 
It doesn't matter how close the prime is to 2 ^ 64 since the
results are chopped.
 
 

I have no idea what you are talking about.
18446744073709551557 == -59.
That's a very small number. With factor like that, for typical case of
pointers that are <= 2**40 and
for table size in 1000s or 10,000s, all keys (==pointers) would be
pushed into the same (uppermost) slot of the table with no hashing at
all.
You can run my test bench and see it yourself.

On the other hand, prime in range (2**63..2**64) that does not have too
many bits set or cleared works very well. But majority of non-primes
with the same properties would work very well as well.



Date Sujet#  Auteur
4 Jun 24 * Re: Good hash for pointers32Michael S
5 Jun 24 +* Re: Good hash for pointers4Bonita Montero
5 Jun 24 i`* Re: Good hash for pointers3Michael S
5 Jun 24 i `* Re: Good hash for pointers2Bonita Montero
5 Jun 24 i  `- Re: Good hash for pointers1Michael S
5 Jun 24 +* Re: Good hash for pointers17Tim Rentsch
5 Jun 24 i+* AES problem (was: Good hash for pointers)2Michael S
6 Jun 24 ii`- Re: AES problem (was: Good hash for pointers)1Tim Rentsch
5 Jun 24 i+* Re: Good hash for pointers11Michael S
6 Jun 24 ii`* Re: Good hash for pointers10Tim Rentsch
6 Jun 24 ii `* Re: Good hash for pointers9Michael S
17 Jun 24 ii  `* Re: Good hash for pointers8Tim Rentsch
17 Jun 24 ii   `* Re: Good hash for pointers7Michael S
18 Jun 24 ii    `* Re: Good hash for pointers6Tim Rentsch
18 Jun 24 ii     +* Re: Good hash for pointers2Keith Thompson
19 Jun 24 ii     i`- Re: Good hash for pointers1Tim Rentsch
19 Jun 24 ii     `* Re: Good hash for pointers3James Kuyper
19 Jun 24 ii      +- Re: Good hash for pointers1Keith Thompson
23 Jun 24 ii      `- Re: Good hash for pointers1Tim Rentsch
6 Jun 24 i`* Re: Good hash for pointers3Michael S
16 Jun 24 i `* Re: Good hash for pointers2Tim Rentsch
16 Jun 24 i  `- Re: Good hash for pointers1Chris M. Thomasson
7 Jun 24 `* Re: Good hash for pointers10Bonita Montero
9 Jun 24  `* Re: Good hash for pointers9Bonita Montero
9 Jun 24   +* Re: Good hash for pointers2Richard Harnden
9 Jun 24   i`- Re: Good hash for pointers1Bonita Montero
10 Jun 24   `* Re: Good hash for pointers6Malcolm McLean
10 Jun 24    +* Re: Good hash for pointers4Tim Rentsch
10 Jun 24    i`* Re: Good hash for pointers3Michael S
10 Jun 24    i +- Re: Good hash for pointers1Bonita Montero
16 Jun 24    i `- Re: Good hash for pointers1Tim Rentsch
10 Jun 24    `- Re: Good hash for pointers1Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal