[Vm-dev] Cog Primitive Performance

Levente Uzonyi leves at caesar.elte.hu
Tue Apr 18 01:23:55 UTC 2017


To be more precise, in SimpleStackBasedCogit >> #genPrimitiveHashMultiply

                MoveCq: 16384 R: TempReg;
                MulR: TempReg R: highReg;                                               "highReg := (16r260D * (receiver bitShift: -14)) + (16r0065 * low)"

could read:

                LogicalShiftLeftCq: 14 R: highReg;                                               "highReg := (16r260D * (receiver bitShift: -14)) + (16r0065 * low) bitShift: 14"

(Note that I changed the comment too; the shift was missing.)

Levente

On Tue, 18 Apr 2017, Levente Uzonyi wrote:

>
> Hi Eliot,
>
> This all sounds pretty cool.
> I wonder why you kept the multiplication by 16384, when you could have 
> just used #bitShift: 14 instead. If I read it correctly, this is like that 
> in the jitted code too.
> I suppose the multiplication is a leftover from the time it was faster 
> than bit shift.
>
> Levente
>


More information about the Vm-dev mailing list