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

Levente Uzonyi leves at elte.hu
Mon Aug 30 23:07:04 UTC 2010


On Sun, 29 Aug 2010, Nicolas Cellier wrote:

> 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.

Cool. It's time to move this thread to the vm-dev list to get these 
patches into the vm trunk.


Levente

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


More information about the Vm-dev mailing list