[Python-Dev] Python 3 optimizations continued...

Guido van Rossum guido at python.org
Tue Aug 30 20:12:13 CEST 2011


On Tue, Aug 30, 2011 at 10:50 AM, stefan brunthaler
<stefan at brunthaler.net> wrote:
>> Do you really need it to match a machine word? Or is, say, a 16-bit
>> format sufficient.
>>
> Hm, technically no, but practically it makes more sense, as (at least
> for x86 architectures) having opargs and opcodes in half-words can be
> efficiently expressed in assembly. On 64bit architectures, I could
> also inline data object references that fit into the 32bit upper half.
> It turns out that most constant objects fit nicely into this, and I
> have used this for a special cache region (again below 2^32) for
> global objects, too. So, technically it's not necessary, but
> practically it makes a lot of sense. (Most of these things work on
> 32bit systems, too. For architectures with a smaller size, we can
> adapt or disable the optimizations.)

Do I sense that the bytecode format is no longer platform-independent?
That will need a bit of discussion. I bet there are some things around
that depend on that.

-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list