Subject: Re: New hash algorithm - FNV - for use in the kernel
To: None <tech-kern@netbsd.org>
From: ozan s. yigit <oz@zonzorp.canada.sun.com>
List: tech-perform
Date: 11/28/2001 11:59:41
i forgot to mention that i have always tested this particular version
of FNV; i believe the multiplicative constant is due to Fowler and Phong
Vo. to this day, i have no idea what Noll's improvement was; maybe he added
the xor. :]

	static unsigned long
	fnv(unsigned char *str)
	{
        	int c;
		unsigned long h = 0;

	        while (c = *str++)
 	               h = (h * 16777619) ^ c;

	        return h;
	}

oz
---

ozan s. yigit			staff engineer, sun microsystems/es
http://www.cs.yorku.ca/~oz	ozan.yigit@sun.com || +1 [905] 415 2878
---
narrowness of experience leads to narrowness of imagination. -- rob pike