I made issue 5858: https://code.google.com/p/pharo/issues/detail?id=5858 And Nicolas Cellier improved my suggestion as noted in the issue. Mariano Martinez Peck wrote
On Thu, May 10, 2012 at 3:21 PM, Paul DeBruicker <pdebruic@> wrote:
On 05/10/2012 04:21 AM, Nicolas Cellier wrote:
Sure, I already changed various Number>>hash and could as well change Point hash to follow recommendations from Andres valloud book hashing in smalltalk...
Nicolas
DateAndTime>>#hash could be changed to :
hash ^ (jdn hashMultiply bitXor: seconds + offset asSeconds) bitXor: nanos
which is 130x faster than whats currently in the image:
hash ^ self asUTC ticks hash
The collision rate on the proposed hash function is 0.04% ( 4 per 10,000 )
please, open an issue for pharo also ;)
-- Mariano http://marianopeck.wordpress.com
-- View this message in context: http://forum.world.st/Re-DateAndTime-hash-was-Re-squeak-dev-true-hash-tp4624... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.