]> err.no Git - varnish/commit
Eliminate the MD5 optional code. There is no sufficiently strong
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 22 Aug 2006 08:55:15 +0000 (08:55 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 22 Aug 2006 08:55:15 +0000 (08:55 +0000)
commit1b296123a7831ccba76039bce88e479fbab971a7
treecedbe8a467955f9b17b12057d0571790e53ea294
parent627d5c3b0b533b8be9f43778080ca1c64453bcf5
Eliminate the MD5 optional code.  There is no sufficiently strong
statistical basis for using MD5 that will outweigh the performance
penalty or "IT USES THE BR0K3N MD5 ALGORITM" cries on slashdot.

The only known artifact in CRC32 is that hashing it with a power
of two is slightly inefficient (a few percent in bucket length
standard deviation) if you have URLs with fixed width fields of
a limited charset (such as numeric) fields in them.

Avoid this by checking the hash width specified for power of two,
and reduce it by one telling the user why.

Using a hash width that is a prime number does provable advantage
over just not using power-of-two width.  I have heard a mathematician
say that this is inherent in the design of the polynomia chosen
for CRC algorithms error (optimized for bit error detection) but
the actual math is way beyond me.

Increase default hash width to 16383, which is probably still
smaller than it should be.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@888 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/hash_classic.c