>>> >>>> Hi! >>>> Apparently in Pharo 1.1, hash values may be greater than 4096. What is the >>>> range of the hash values? >>>> Cheers, >>>> Alexandre >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [email protected] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> Hash values could always be greater than 4096 :) >>> Identity hashes can't, but they are scaled in 1.1, to avoid bad clustering >> >> That's not true. You may be surprised, but the value of #identityHash can be >> any SmallInteger. Just try this: >> {SmallInteger minVal. SmallInteger maxVal} collect: #identityHash. > Yeah, forgot about that one. >> >>> for objects not redefining hash. >>> Basically they're multiplied by 2^18, which gives the largest possible >>> range while still keeping all small integers. >>> See ProtoObject>>identityHash for details, old identityHash is now >>> basicIdentityHash. >> >> This may cause compatibility problems for packages which implement custom >> hashes or custom hashed collections. I think Magma will be affected by this, >> though I didn't check the code. >> >> > Not sure why it ended up basicIdentity / identity instead of identity / > scaledIdentity, but that's true.
so what should we do in 1.2? Stef _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
