Message81822
Antoine, x ^= x>>4 has a higher collision rate than just a rotate.
However, it's still lower than a statistically random hash.
If you modify the benchmark to randomly discard 90% of its contents this
should give you random addresses, reflecting a long-running program.
Here's the results I got (I used shift, too lazy to rotate):
XOR, sequential: 20.174627065692999
XOR, random: 30.460708379770004
shift, sequential: 19.148091554626003
shift, random: 30.495631933229998
original, sequential: 23.736469268799997
original, random: 33.536177158379999
Not massive, but still worth fixing the hash. |
|
Date |
User |
Action |
Args |
2009-02-12 21:33:34 | Rhamphoryncus | set | recipients:
+ Rhamphoryncus, rhettinger, jcea, chemacortes, mark.dickinson, pitrou, LambertDW |
2009-02-12 21:33:34 | Rhamphoryncus | set | messageid: <1234474414.21.0.240785638217.issue5186@psf.upfronthosting.co.za> |
2009-02-12 21:33:32 | Rhamphoryncus | link | issue5186 messages |
2009-02-12 21:33:31 | Rhamphoryncus | create | |
|