[Vm-dev] SmallIntPair as immediate word

K K Subbu kksubbu.ml at gmail.com
Wed Apr 10 16:28:34 UTC 2019


On 10/04/19 4:03 PM, Stephan Eggermont wrote:
> 
>> On 09.04.2019, at 18:44, K K Subbu<kksubbu.ml at gmail.com>  wrote:
>>
>> All,
>>
>> Squeak release image contains around 15k Points with none using more than
>> 24 bits per coordinate.
>>
>> On 64-bit machines, it should be possible to pack two integers of a pair
>> into a single immediate word - 30+30.
>>
>> Has anyone tried to do this? It would save space and eliminate object
>> alloc. But I am not sure about the overall performance hit.
>>
>> Regards .. Subbu
> Does that hold when using 8K displays?

Yes. 8K is 7680 x 4320 - 13bits each for x and y. That is just 13bits 
for x and y. In any case, if any integer in a pair overflows, it will be 
stored in a heap object.

Regards .. Subbu


More information about the Vm-dev mailing list