2017-11-16 23:32 GMT+01:00 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com >:then forget the original authors because it really does not matter, does it?Fortunately, one can still pick the methods from Squeak :)and profit by more efficient 64bit version for 64bit VM...While at it, one should also rewrite the method contents in order to use the new primitive availablebitAnd 16383 is <=> isolating lowest 14 bits...It's not documented because hashing is complex...The goal is to shuffle the receiver bits and distribute them over the available 28bits used for hash codes.why and how it does so is a tough subject, Andres Valloud wrote a whole book on it ;)The basic operation which is emulated is relatively simple, but implementation is overly complex, because it tries to avoid creating LargeIntegers in 32bits VM*16384 is <=> bitShift: 142017-11-16 22:25 GMT+01:00 Stephane Ducasse <stepharo.self@gmail.com>:Hi guys
I would love to have a better method comment for
hashMultiply
�� �� | low |
�� �� low := self bitAnd: 16383.
�� �� ^(16r260D * low + ((16r260D * (self bitShift: -14) + (16r0065 *
low) bitAnd: 16383) * 16384))
�� �� bitAnd: 16r0FFFFFFF
Some love?
Stef