[Python-ideas] More compact bytecode

Serhiy Storchaka storchaka at gmail.com
Thu Feb 4 13:48:46 EST 2016


On 04.02.16 19:28, Andrew Barnert via Python-ideas wrote:
>> Actually in common case this "if" is executed at compile time. But I
>> expect a benefit from using simple read of 16-bit value instead of 3
>> reads of 8-bit values.
>
> Only if the 16-bit reads are aligned. Can that be guaranteed somehow?

Yes, we can. On common platforms the start of bytes data is at least 
32-bit aligned. Other code depends on this. It can be not aligned only 
on platform where the alignment doesn't matter.




More information about the Python-ideas mailing list