phash: Be a bit more aggressive about trying to make a small hash

Change the threshold to 0.7 instead of 0.8.
This commit is contained in:
H. Peter Anvin 2007-09-12 01:27:53 +00:00
parent ce9be34d3d
commit cdea6f96b6

View File

@ -163,7 +163,7 @@ sub gen_perfect_hash($) {
# Minimal power of 2 value for N with enough wiggle room.
# The scaling constant must be larger than 0.5 in order for the
# algorithm to ever terminate.
my $room = scalar(@keys)*0.8;
my $room = scalar(@keys)*0.7;
$n = 1;
while ($n < $room) {
$n <<= 1;