[Pharo-dev] [squeak-dev] Spur Identity Hash [was: The Trunk:
System-cmm.689.mcz]
Chris Muller
ma.chris.m at gmail.com
Fri Nov 14 20:10:44 UTC 2014
>> Suprising that their identityHash needs to change for Spur but not to
>> go to 64-bit..
>>
>> Wait, I thought one of the benefits of 64-bit was to finally increase
>> that small identityHash?
>
> 22 is already a lot more than the current 12.
Ah, indeed, I forgot how utterly small the current identityHash is! I
of course would like to go even bigger than 22. I've been using
MaIdentityDictionary's developed by Igor which provide linked-lists at
each of the 4096 slots so that collisions are less onerous. That same
strategy under 22-bit will scale a LOT further.. Ohh, I should put a
#isRunningSpur check in there..
> Current hashed collections
> should give excellent performance up to 4 million elements with a 22-bit
> identity hash. Insertion and lookup performance should be good up to 60
> million elements, and removal performance should be good up to 20 million.
> And you'll still be able to use hashed collections optimized for large
> sizes[1][2] if you want to store more objects.
I did try your LargeIdentityDictionary a few years ago but for some
reason Magma test suite couldn't pass with it, and since I had Igor's
I didn't have quite enough urgency to debug why.
> Levente
>
> [1] http://leves.web.elte.hu/LargeIdentityDictionary/
> [2]
> http://leves.web.elte.hu/LargeIdentityDictionary/LargeIdentityDictionary2.png
>
> P.S.: With a primitive I suggested long ago, the blue line on the picture
> (#at:) could be as flat as the red (#includesKey:).
More information about the Squeak-dev
mailing list
|