[squeak-dev] Pending inbox items: #removeAll and #flatten vs. #flattened

UZONYI Levente leves at elte.hu
Thu Sep 17 21:43:07 UTC 2009


Hi!

On Thu, 17 Sep 2009, Nicolas Cellier wrote:

> 2009/9/17 Andreas Raab <andreas.raab at gmx.de>:
>> Nicolas - since you took the lead on removeAll, can I ask you to review and
>> merge it as appropriate (it looks like there are some specialized
>> implementations of #removeAll that may or may not be useful; it would be
>> good if you could check that).
>>
>
> OK, some extensions are good and I uploaded them.
>
> Some others are conflicting and I did not upload them.
> They are good too: the main difference is that klub preserves the
> array of (OrderedCollection/Set/WeakSet) by using atAllPut: nil, while
> I created a new one.
> My implementation is a little cheaper for small/medium collections,
> but klub's might perform better for huge ones (less pressure on
> garbage collector). What do you think ?
>

The idea was to give the garbage collector less work. We found that 
#atAllPut: is pretty fast for the job. It would be good to know how the 
current (and the new) garbage collector can handle these. We assumed that 
#removeAll will mostly be sent to "old" objects, so AFAIK only a full gc 
can get rid of the thrown away collections with the current garbage collector.

> Not enough Collection subclasses are tested. Someone should write more
> test because ...

Yes, more tests would be nice. :)

Cheers,
Levente



More information about the Squeak-dev mailing list