j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Provide 1% speed up increase for the browser benchmark.
Stef
Begin forwarded message:
From: Marcus Denker denker@iam.unibe.ch Date: 22 décembre 2006 13:00:54 HNEC To: Stephane Ducasse ducasse@iam.unibe.ch Cc: Adrian Kuhn akuhn@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.
squeak-dev@lists.squeakfoundation.org