Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S Newsgroups: comp.lang.c Subject: Re: Good hash for pointers Date: Fri, 24 May 2024 19:27:48 +0300 Organization: A noiseless patient Spider Lines: 13 Message-ID: <20240524192748.000046ab@yahoo.com> References: <86v834i1o9.fsf@linuxsc.com> <86r0dshysc.fsf@linuxsc.com> <86ed9shtsj.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Fri, 24 May 2024 18:27:55 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1fee8cf0e42f956136de9de1398c0c93"; logging-data="2536562"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Hf4XMNtAcWIyj2Q82iVqoHAB1xzSlP0A=" Cancel-Lock: sha1:suzL0/53opXT/Qdp177H24sqvx4= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) Bytes: 1612 On Fri, 24 May 2024 17:10:45 +0100 Malcolm McLean wrote: > > So if we use uintptr_t the code might break. > And if we use unsigned long we have to assume maximum 32 bits. > However it's unlikely anyone will have an xml file with more than a > billion nodes. > It's not about # of nodes. It's about good hash functions tend to use 64-bit multiplication.