From 8ac04967afa079525f14b42d77496f34f82a67de Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 24 Sep 1998 04:52:48 +0000 Subject: [PATCH] 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 --- hv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.7.4