From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 28 15:57:01 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 5EF4C16A418 for ; Fri, 28 Dec 2007 15:57:01 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 0890E13C474 for ; Fri, 28 Dec 2007 15:57:00 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id lBSFutfh005806; Fri, 28 Dec 2007 09:56:55 -0600 (CST) (envelope-from scf@FreeBSD.org) Date: Fri, 28 Dec 2007 09:56:55 -0600 (CST) From: "Sean C. Farley" To: Ivan Voras In-Reply-To: <9bbcef730712280454w6b6f5e17s33631223d5571f83@mail.gmail.com> Message-ID: References: <5950EE0C-383D-4D6B-9991-A0DEABD2ADE4@u.washington.edu> <20071228003716.GB48997@lor.one-eyed-alien.net> <4774EF27.90307@gmail.com> <9bbcef730712280454w6b6f5e17s33631223d5571f83@mail.gmail.com> User-Agent: Alpine 1.00 (BSF 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: freebsd-hackers@FreeBSD.org, "Aryeh M. Friedman" 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: Fri, 28 Dec 2007 15:57:01 -0000 On Fri, 28 Dec 2007, Ivan Voras wrote: > On 28/12/2007, Aryeh M. Friedman wrote: > >> All hashs have issues with pooling.... see >> http://www.burtleburtle.net/bob/hash/index.html... > > Here's a more direct link: > http://www.burtleburtle.net/bob/hash/doobs.html > > This one is much better according to > http://en.wikipedia.org/wiki/Hash_table#Choosing_a_good_hash_function That is the "one" :) I used for a string-based key. I used Knuth's Multiplicative Method[1] for hashing an address along with detection of the compilation platform (32 or 64 bits) to determine the shift. Sean 1. http://www.concentric.net/~Ttwang/tech/addrhash.htm -- scf@FreeBSD.org