Deutsch English Français Italiano |
<86y17ilm4k.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: Good hash for pointers Date: Wed, 05 Jun 2024 21:40:27 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: <86y17ilm4k.fsf@linuxsc.com> References: <v2n88p$1nlcc$1@dont-email.me> <v2qm8m$2el55$1@raubtier-asyl.eternal-september.org> <v2qnue$2evlu$1@dont-email.me> <v2r9br$2hva2$1@dont-email.me> <86fru6gsqr.fsf@linuxsc.com> <v2sudq$2trh1$1@raubtier-asyl.eternal-september.org> <8634q5hjsp.fsf@linuxsc.com> <v2vmhr$3ffjk$1@raubtier-asyl.eternal-september.org> <86le3wfsmd.fsf@linuxsc.com> <v2voe7$3fr50$1@raubtier-asyl.eternal-september.org> <86ed9ofq14.fsf@linuxsc.com> <20240605005916.00001b33@yahoo.com> <86a5jzmle1.fsf@linuxsc.com> <20240605195905.00002484@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Thu, 06 Jun 2024 06:40:28 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d27732bb70530c4a14d68e0b12f92cb8"; logging-data="1440310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7+JJbRJiAeNj1G8toGfDbaB4ZWDMGOUA=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:CaXIMenGW8FrmK0rY9TNuDjz9lM= sha1:VS2G+DHm0GeciTiRih7phUUxsOI= Bytes: 2211 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.