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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

stephane ducasse
Provide 1% speed up increase for the browser benchmark.

Stef

Begin forwarded message:

> From: Marcus Denker <[hidden email]>
> Date: 22 décembre 2006 13:00:54 HNEC
> To: Stephane Ducasse <[hidden email]>
> Cc: Adrian Kuhn <[hidden email]>
> 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.