[squeak-dev] The Trunk: Collections-nice.570.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat May 24 22:42:41 UTC 2014


Once again, I pushed this un-essential 3 years old change to trigger
another CI build...
If the build fails, don't worry, there are many other un-essential changes
I did.
Why do you think I keep my images and use the update stream?


2014-05-25 0:38 GMT+02:00 <commits at source.squeak.org>:

> Nicolas Cellier uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-nice.570.mcz
>
> ==================== Summary ====================
>
> Name: Collections-nice.570
> Author: nice
> Time: 25 May 2014, 12:37:21.454 am
> UUID: 1069cfcc-6bd7-4d7d-87fb-0a0a546f8a0c
> Ancestors: Collections-nice.569
>
> Let's optimize a bit LinkedList>>at:ifAbsent: by scanning the list only
> once, unlike super.
>
> =============== Diff against Collections-nice.569 ===============
>
> Item was added:
> + ----- Method: LinkedList>>at:ifAbsent: (in category 'accessing') -----
> + at: index ifAbsent: exceptionBlock
> +       "Optimized to scan the list once, super would twice."
> +       | i |
> +       index < 1 ifTrue: [^exceptionBlock value].
> +       i := 0.
> +       self do: [:link |
> +               (i := i + 1) = index ifTrue: [^ link]].
> +       ^exceptionBlock value!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140525/3cb4171b/attachment.htm


More information about the Squeak-dev mailing list