Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Richard Harnden Newsgroups: comp.lang.c Subject: Re: Good hash for pointers Date: Sun, 9 Jun 2024 12:40:27 +0100 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: <86fru6gsqr.fsf@linuxsc.com> <8634q5hjsp.fsf@linuxsc.com> <86le3wfsmd.fsf@linuxsc.com> <86ed9ofq14.fsf@linuxsc.com> <20240605005916.00001b33@yahoo.com> Reply-To: nospam.harnden@invalid.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 09 Jun 2024 13:40:28 +0200 (CEST) Injection-Info: dont-email.me; posting-host="df45bc6214e90ea7647e371874085ec1"; logging-data="3645756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KCdLfJXgDkWy+bRRdJelLv9r7zA88oaU=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:OQhF7vQ9XHPc69ipFv1NZEc6Rew= In-Reply-To: Content-Language: en-US X-Antivirus: AVG (VPS 240609-0, 6/9/2024), Outbound message X-Antivirus-Status: Clean Bytes: 2413 On 09/06/2024 12:35, Bonita Montero wrote: > With the code I've shown I proved that the hash AES hashfunction > is totally stochastically and thereby a good hash function. But > I was still discontent with the speed of the code. > Usually you're not able to update the buckets of a hashtable with > multiple threads without any locking. But with my code the buckets > are only simple counters which could be updated atomically. > So I could reduce the code and partitioned the input range to the > hash function with the available number of cores. Here's the code: > > #include This is not C -- This email has been checked for viruses by AVG antivirus software. www.avg.com