From: Gurusamy Sarathy Date: Thu, 24 Sep 1998 04:52:48 +0000 (+0000) Subject: tweak PERL_HASH() to h=h+(h>>5) in order to improve distribution of X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ac04967afa079525f14b42d77496f34f82a67de;p=p5sagit%2Fp5-mst-13.2.git tweak PERL_HASH() to h=h+(h>>5) in order to improve distribution of low bits (suggested by Ilya Zakharevich) p4raw-id: //depot/perl@1865 --- diff --git a/hv.h b/hv.h index 19694ac..466f33d 100644 --- a/hv.h +++ b/hv.h @@ -45,7 +45,7 @@ struct xpvhv { register U32 hash_PeRlHaSh = 0; \ while (i_PeRlHaSh--) \ hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \ - (hash) = hash_PeRlHaSh; \ + (hash) = hash_PeRlHaSh + (hash_PeRlHaSh>>5); \ } STMT_END