[squeak-dev] The Trunk: Collections-tfel.613.mcz
Chris Muller
asqueaker at gmail.com
Thu Apr 9 15:16:08 UTC 2015
On Thu, Apr 9, 2015 at 10:11 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
>> On 09.04.2015, at 16:56, Chris Muller <asqueaker at gmail.com> wrote:
>>
>>> Tim Felgentreff uploaded a new version of Collections to project The Trunk:
>>> http://source.squeak.org/trunk/Collections-tfel.613.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Collections-tfel.613
>>> Author: tfel
>>> Time: 9 April 2015, 9:09:08.368 am
>>> UUID: 9e6e47d3-17ac-f847-976f-40872d002ab8
>>> Ancestors: Collections-bf.612
>>>
>>> Fix replaceFrom:to:with:startingAt: for ByteArray if run on a VM without primitive 105
>>>
>>> =============== Diff against Collections-bf.612 ===============
>>>
>>> Item was added:
>>> + ----- Method: ByteArray>>at:put: (in category 'accessing') -----
>>> + at: index put: value
>>> + <primitive: 61> "try primitiveAtPut, convert value to integer if that fails and try again"
>>> + ^ self byteAt: index put: value asInteger
>>
>> Egads! This is a performance critical method that has now been slowed by half!
>>
>> old version: '94,500,000 per second. 10.6 nanoseconds per run.'
>> new version: '49,400,000 per second. 20.3 nanoseconds per run.'
>
> What exactly are you testing?
|ba| ba:= ByteArray new: 1.
[ba byteAt: 1 put: 200] bench
and
|ba| ba:= ByteArray new: 1.
[ba at: 1 put: 200] bench
More information about the Squeak-dev
mailing list
|