help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] OrderedCollection growing


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] OrderedCollection growing
Date: Fri, 24 Jun 2011 12:17:25 +0200

On Fri, Jun 24, 2011 at 08:17, Gwenael Casaccio <address@hidden> wrote:
> Hi,
>
> I've made a small change in OrderedCollection in growBy:shift:
> I use the primitive VMpr_OrderedCollection_replaceFromToWithStartingAt.
> I guess it should be possible to tweak again a bit the behavior:

That's very nice, you could also implement all of
#replaceFrom:to:with:startingAt: with the primitive instead?  The
primitive would be #primReplaceFrom:to:with:startingAt:.  Then you
don't need a change in #growBy:shift:, I think.

>  In addLast or addFirst if we have any free rooms but first is <= 1 or last
>>= n we could move instead of allocating a new collection.

Is it really helpful?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]