Re: Fast 64 bit hash?
Have you looked at Fowler-Noll-Vo (FNV) hash?
http://www.isthe.com/chongo/tech/comp/fnv/index.html
>From the "History section":
"FNV hashes are designed to be fast while maintaining a low collision
rate. The FNV speed allows one to quickly hash lots of data while
maintaining a reasonable collision rate. The high dispersion of the
FNV hashes makes them well suited for hashing nearly identical strings
such as URLs, hostnames, filenames, text, IP addresses, etc. "
I don't have a Lisp implementation sitting around, but it's a pretty
short, straightforward algo.
On Thu, Jun 5, 2008 at 1:32 PM, Chris Dean <ctdean@sokitomi.com> wrote:
>
>
> Martin Simmons <martin@lispworks.com> writes:
>> You could try an equalp hash-table, but I make no promises about the
>> efficiency :-)
>>
>> What is "fast" will probably depend on the lengths of the arrays and how much
>> the elements vary. E.g. for random elements, just looking at the first 4
>> might be sufficient.
>
> I actually need just the hashing function, not a hash-table.
> Basically the equivalent of sxhash for (array (unsigned-byte 8) (*))
>
> We have a disk based database that uses that 64 bit hash. Similar to
> the Berkeley DB hash databses.
>
> The builtin LispWorks hash-table works great, and I do use equalp
> hash-tables :).
>
> Cheers,
> Chris Dean
>
>