[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [PATCH] kernel: Speed up MethodDictionary>>#select:
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] [PATCH] kernel: Speed up MethodDictionary>>#select: |
Date: |
Sun, 19 Jan 2014 17:20:58 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Jan 19, 2014 at 05:14:36PM +0100, Holger Hans Peter Freyther wrote:
Dear Gwenaƫl,
I would like to introduce the optimization and have one more question.
> + dangerouslyAt: aKey put: aValue [
> + <category: 'private methods'>
> +
> + | index |
> + index := self findIndex: aKey.
> + (self primAt: index) isNil
> + ifTrue: [
> + self incrementTally
> + ifTrue: [ index := self findIndex: aKey ].
> + self primAt: index put: aKey]
> + ifFalse: [ (self valueAt: index) discardTranslation ].
> + self valueAt: index put: aValue.
> + ^ aValue
Why do we need the ifFalse: case? This would flush the JITed code of
a translated method but we have not modified that method? Can you please
elaborate?