[squeak-dev] Set/Dictionary>>fixCollisionsFrom: broken

Igor Stasenko siguctua at gmail.com
Fri Nov 13 22:30:01 UTC 2009


2009/11/13 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> 2009/11/13 Levente Uzonyi <leves at elte.hu>:
>> Hi,
>>
>> On Fri, 13 Nov 2009, Levente Uzonyi wrote:
>>
>>> I uploaded another approach to the inbox (Kernel-ul.295 and
>>> Collections-ul.188). It implements #fixCollisionsFrom: where its required
>>> and removes all implementors of #keyAt:. All kernel and collecions tests are
>>> green and the remove performance should be a bit better than before for all
>>> sets and dictionaries, while the number of methods didn't change (though loc
>>> is a bit more than before).
>>
>> Just found out that Set >> #swap:with: can be removed too, since
>> #fixCollisionsFrom: is implemented in MethodDictionary which was the only
>> class in the Set hierarchy that overrode that method. One method less, same
>> amount of code, slightly better remove performance. Load Kernel-ul.297
>> first, then Collections-ul.190 from the inbox. Ignore the previous versions
>> (Kernel-ul.295 and Collections-ul.188).
>>
>> Levente
>>
>>
>
> +1 even if swap:with: is private, it's even better to not expose such
> a method at all
>
+1 , especially in base class, which could provoke abuses.

>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list