chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] better hash function


From: Alex Shinn
Subject: Re: [Chicken-hackers] better hash function
Date: Wed, 19 Mar 2008 22:12:34 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

>>>>> "minh" == minh thu <address@hidden> writes:

    minh> Would it be easy to try out other ones ? Maybe
    minh> you'd be interested in
    minh> http://murmurhash.googlepages.com/ or
    minh> http://cmph.sourceforge.net/

If someone else wants to put in the effort, go for it.

I did look at murmurhash since it was on reddit recently,
but it was a lot more code that has to be duplicated in 3
places in runtime.c (could be reduced to 2), and it also
happens to be non-portable C (casting a char* to int* won't
work on some platforms if the char* isn't properly aliged -
this could be fixed with additional alignment checks).  In
general it looked a little questionable - the biggest boast
it makes is that it's "faster" than the other alternatives,
but the only reason it's any faster is because it processes
4 bytes at a time (the aforementioned typecast) and to make
this count he timed unrealistically large (256k!) strings.
That's practically a forged benchmark.

Anyway, FNV works and is proven, so I'm not particularly
interested in working on this further.

-- 
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]