[Python-Dev] Byte code arguments from two to one byte: did anyone try this?

Cesare Di Mauro cesare.di.mauro at gmail.com
Mon Jan 31 14:30:57 CET 2011

2011/1/31 Terry Reedy <tjreedy at udel.edu>

> On 1/31/2011 5:31 AM, Steven D'Aprano wrote:
>> Jurjen N.E. Bos wrote:
>>> I was impressed by the optimizations already in there, but I still
>>> dare to suggest an optimization that from my estimates might shave off
>>> a few cycles, speeding up Python about 5%.
>>> The idea is simple: change the byte code argument values from two
>>> bytes to one.
>> Interesting. Have you seem Cesare Di Mauro's WPython project, which
>> takes the opposite strategy?
>> http://code.google.com/p/wpython2/
> The two strategies could be mixed. Some 'word codes' could consist of a
> bytecode + byte arg, and others a real word code. Maybe WPython does that
> already. Might end up being slower though.
> --
>  Terry Jan Reedy

Yes, WPython already does it (
, but on average it was faster (pag. 28).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110131/6a80212e/attachment.html>

More information about the Python-Dev mailing list