[squeak-dev] 4.1 - hashed collections still a problem

Andres Valloud avalloud at smalltalk.comcastbiz.net
Tue Mar 30 08:09:22 UTC 2010


Right, so provide a better identityHash implementation in the image 
(e.g.: implement hash and then have identityHash call hash instead), and 
problem solved...

On 3/26/10 3:37 , Levente Uzonyi wrote:
> On Thu, 25 Mar 2010, Andres Valloud wrote:
>
>    
>> If lookups find the sought object in mostly one attempt, the primitive is
>> overkill... most of the time, the real issue is the quality of the hash
>> function.
>>      
> That's true, but this is not the case with the 4096 hash values.
>
>
> Levente
>
>    
>> On 3/25/10 1:27 , Levente Uzonyi wrote:
>>      
>>> On Thu, 25 Mar 2010, Igor Stasenko wrote:
>>>
>>>
>>>        
>>>> i think that #pointsTo: is a cheat :), which you can use in Sets but
>>>> not dictionaries, because
>>>> it contains associations. Also, it works only for identity-based
>>>> collections.
>>>>
>>>>          
>>> Dictionaries don't have to use associations (for example MethodDictionary
>>> doesn't use them), that's why #pointsTo: works (MethodDictionary also
>>> uses it).
>>>
>>>
>>>        
>>>>          
>>>>> I wonder how LargeIdentityDictionary compares to your dictionaries'.
>>>>>
>>>>>
>>>>>            
>>>> me too.
>>>>
>>>>          
>>> If you give me a pointer to the source code, I can run the benchmarks.
>>>
>>>
>>> Levente
>>>
>>>
>>>
>>>        
>>
>>      
>
>    



More information about the Squeak-dev mailing list