[squeak-dev] The Inbox: Collections-cmm.872.mcz

Chris Muller asqueaker at gmail.com
Wed Jan 22 05:58:56 UTC 2020


This accidental commit has been treated.

Please see Collections-cmm.873.


On Tue, Jan 21, 2020 at 11:37 PM <commits at source.squeak.org> wrote:

> Chris Muller uploaded a new version of Collections to project The Inbox:
> http://source.squeak.org/inbox/Collections-cmm.872.mcz
>
> ==================== Summary ====================
>
> Name: Collections-cmm.872
> Author: cmm
> Time: 21 January 2020, 11:36:51.164974 pm
> UUID: d1855708-4276-4201-a983-f8b49f71b988
> Ancestors: Collections-ul.871
>
> Let #new: *always* be a performance-improving choice over #new, when the
> correct size is known.
>
> =============== Diff against Collections-ul.871 ===============
>
> Item was changed:
>   ----- Method: HashedCollection class>>new: (in category 'instance
> creation') -----
> + new: numberOfElements
> +       "Create a Set large enough to hold numberOfElements without
> growing"
> +       ^ self basicNew initialize:
> +               (numberOfElements < 3
> +                       ifTrue: [ 3 ]
> +                       ifFalse:
> +                               [ numberOfElements < 5
> +                                       ifTrue: [ 5 ]
> +                                       ifFalse: [ self sizeFor:
> numberOfElements ] ])!
> - new: nElements
> -       "Create a Set large enough to hold nElements without growing"
> -       ^ self basicNew initialize: (self sizeFor: nElements)!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200121/33a2bebc/attachment.html>


More information about the Squeak-dev mailing list