[squeak-dev] bitShift: optimisation on COG [WAS: DigitalSignatureAlgorithm>>#initRandomNonInteractivelyisnot random]

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Aug 29 17:52:07 UTC 2010


2010/8/29 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> 2010/8/29 Levente Uzonyi <leves at elte.hu>:
>>
>> snip...
>>
>>> Maybe http://bugs.squeak.org/view.php?id=7109 would serve a bit too...
>>
>> Hm. This looks interresting, I guess some optimizations are already
>> implemented:
>>
>> | x |
>> x := SmallInteger maxVal raisedTo: 100.
>> #(-1600 -1597 1597 1600) collect: [ :shift |
>>        [ 1 to: 100000 do: [ :i | x bitShift: shift ] ] timeToRun ].
>> "CogVM  ===> #(150 147 271 64)"
>> "SquakVM ===> #(97 118 343 71)"
>>

I regenerated COG, and I get:

Original COG
        #(281 292 621 275)
        #(284 290 604 271)
COG + 7109
        #(167 239 509 289)
        #(172 246 500 288)
Oops, it was development build...

So I retried with deployment:
Original COG
        #(116 114 219 65)
        #(116 113 219 65)
COG + 7109
        #(47 77 120 61)
        #(46 75 120 61)

So I think yes, the patch should better be integrated.
It's only a small contributor of crypto timings, but it counts.

Nicolas

>>
>> Levente
>>
>
> I should have a look at source then...
>



More information about the Squeak-dev mailing list