Message20609
Logged In: YES
user_id=1033539
Re Tim's concern about cache hits:
The trade-off is a slight risk of slight performance
degradation when hashing very long tuples, versus
the risk of complete app failure in certain rare cases
like Steve's. I think it is worthwhile to use more
constants.
Anecdotally, I did not experience any qualitative
slowdown while exercising these things with the
unit tests. OTH, I didn't time anything, and anyway
I am using a creaky old Celeron.
Another alternative: use two constants:
x = (len & 0x1 ? 0xd76aa471 : 0xe8c7b75f) * (++x ^ y);
That passes all of the current unit tests, including
Tim's set. However, with that I am less confident that this
bug won't come up again in the future. |
|
Date |
User |
Action |
Args |
2007-08-23 14:21:14 | admin | link | issue942952 messages |
2007-08-23 14:21:14 | admin | create | |
|