May 10, 2012
5:43 p.m.
On Thu, May 10, 2012 at 3:21 PM, Paul DeBruicker <pdebruic@gmail.com> 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