Author ygale
Recipients
Date 2004-05-19.23:24:06
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1033539

I uploaded my current diff and some unit tests
to patch #957122.

Please look over the unit tests carefully. I am
sure there is much more we can do.

Note that besides the addition of the table containing
the constants, only three lines of code are changed
from the original function.
By inspection, this code should run at essentially
the same speed as the old code on all platforms
(tests anyone?)

Based on the results of the unit tests, I had to
do some tweaking.

First of all, Tim is correct: constants that are divisible
by any
small prime (e.g., 2) are a problem. To be on the safe side,
I replaced each md5 constant with a nearby prime.

I ran into a problem with empty tuples nested in tuples.
The seed kept getting xored with itself. It turns out that
no matter how nice the md5 constants are, they all
produce the same value when multiplied by zero.
Find "++x" in the code to see the fix for this.

Finally, I moved the xor with the tuple length from
the end of the calculation to the beginning. That
amplifies the effect very nicely.
History
Date User Action Args
2007-08-23 14:21:14adminlinkissue942952 messages
2007-08-23 14:21:14admincreate