From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 29 11:47:58 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B047216A417; Sat, 29 Dec 2007 11:47:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 702D113C478; Sat, 29 Dec 2007 11:47:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id BFA69209C; Sat, 29 Dec 2007 12:47:45 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 37CB02049; Sat, 29 Dec 2007 12:47:45 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 04E398449B; Sat, 29 Dec 2007 12:47:45 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Aryeh M. Friedman" References: <5950EE0C-383D-4D6B-9991-A0DEABD2ADE4@u.washington.edu> <20071228003716.GB48997@lor.one-eyed-alien.net> <4774EF27.90307@gmail.com> Date: Sat, 29 Dec 2007 12:47:44 +0100 In-Reply-To: <4774EF27.90307@gmail.com> (Aryeh M. Friedman's message of "Fri\, 28 Dec 2007 07\:42\:15 -0500") Message-ID: <86r6h5zpr3.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: BSD license compatible hash algorithm? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2007 11:47:58 -0000 "Aryeh M. Friedman" writes: > All hashs have issues with pooling.... see > http://www.burtleburtle.net/bob/hash/index.html... btw it is a old > wives tale that the number of buckets should be prime (mostly based on > the very weak implementation Knuth offered) Not an "old wives' tale", but rather an easy way to implement a hash algorithm that is good enough for most simple uses: metric modulo table size, where metric is a number derived from the item in such a manner as to give a good spread. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no