[squeak-dev] The Trunk: Collections-tfel.613.mcz

Bert Freudenberg bert at freudenbergs.de
Thu Apr 9 16:19:20 UTC 2015


On 09.04.2015, at 17:16, Chris Muller <asqueaker at gmail.com> wrote:
> 
> On Thu, Apr 9, 2015 at 10:11 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>> 
>>> 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

These two are not equivalent. #at:put: is optimized by the VM.

I would be very surprised if Tim's changes have any effect on performance one way or other. They're purely about correctness.

To test, you would have to run the exact same code before and after updating.

- Bert -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4115 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150409/c637c54e/smime.bin


More information about the Squeak-dev mailing list