Fwd: 0005666: Faster Dictionary>>at:ifAbsentPut:

stephane ducasse stephane.ducasse at free.fr
Fri Dec 22 14:40:09 UTC 2006


Provide 1% speed up increase for the browser benchmark.

Stef

Begin forwarded message:

> From: Marcus Denker <denker at iam.unibe.ch>
> Date: 22 décembre 2006 13:00:54 HNEC
> To: Stephane Ducasse <ducasse at iam.unibe.ch>
> Cc: Adrian Kuhn <akuhn at iam.unibe.ch>
> Subject: 0005666: Faster Dictionary>>at:ifAbsentPut:
>
> http://bugs.impara.de/view.php?id=5666
>
> Change Set: FasterIfAbsentPut-md
> Date: 21 December 2006
> Author: Marcus Denker
>
> Dictionary>>#at:ifAbsentPut: searches two times the dictionary when  
> the key is absent:
>
> self at: key ifAbsent: [self at: key put: aBlock value]
>
> This changeset provides a version that calls #findElementOrNil:  
> only once and
> a slightly faster implementation of Association>key:value. This  
> should make
> Dictionary>>at:put a little bit faster, too.
>
> The changeset provides a simple test for #at:ifAbsentPut.




More information about the Squeak-dev mailing list