diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-09-24 04:52:48 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-09-24 04:52:48 +0000 |
commit | 8ac04967afa079525f14b42d77496f34f82a67de (patch) | |
tree | aeebdde52fe7d7b01635b7778afe2760e6394e60 /hv.h | |
parent | d3b6f988cac8d2811966703f0abfa69a19d8e06a (diff) | |
download | perl-8ac04967afa079525f14b42d77496f34f82a67de.tar.gz |
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
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |