I'm wondering if we couldn't add a String to the Dictionary class and use that instead of doing a malloc/strcpy everytime.. this function is called jillions of times.
That's probably a good idea.
I'm also curious as to why not use Knuth's golden ratio hash function,No one really cares *what* this hash function is. I certainly don't care if it's "well studied" if it works. The "original" hash you point to was one I derived in the 3.1 betas that seemed to show the fewest bad hashes on as many test sets I could find. One catch to this hash function is that it sees a lot of URLs, which means that "classic" hash functions don't always work well.
it's a well studied and known-good hash.
I can make the change and test it.. I'm just curious about the rational
for both the origional hash function and the change.
The change did seem to show performance improvements for me, though I'll admit I didn't count the number of bad hashes.
I've seen lots of "well it works" hash functions used in other situations, which is what I'd say about any replacements, Knuth or not.
-Geoff
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev
