[squeak-dev] The Trunk: Collections-nice.570.mcz
Tobias Pape
Das.Linux at gmx.de
Sat May 24 22:57:58 UTC 2014
On 25.05.2014, at 00:42, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> 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?
>
>
Strangely, I like this pattern very much!
> 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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1625 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140525/5cdd2038/signature.pgp
More information about the Squeak-dev
mailing list
|