Python Bytecode

Christos TZOTZIOY Georgiou DLNXPEGFQVEB at spammotel.com
Wed Aug 21 19:04:37 CEST 2002


On Wed, 21 Aug 2002 11:03:04 GMT, rumours say that Michael Hudson
<mwh at python.net> might have written:

>> I agree (without any thorough scientific backing :) that the savings
>> should not be that great; I'll give it (method 2) a try though, and
>> report back... won't make any promises :)
>
>Look forward to seeing it!

Well, I implemented four new opcodes (changing opcodes.h, ceval.c and
dis.py) in order to be able to play freely with compile.c.  I can post
the diff outputs for anyone interested (if also it's ok in the
newsgroup, they're not long anyway), although the compile.c is not
"final" --the version I have now has only com_list_if, com_assert_stmt,
com_if_stmt and com_while_stmt touched-- but the build is stable and
passes all tests (at least test.testall, plus some checks of my own).
Bytecodes of .py[co] files are somewhat shortened, but pystone timings
are only marginally better, as expected.
At least the bytecode seems a little bit more tidy :)
-- 
TZOTZIOY, I speak England very best,
Real email address: 'dHpvdEBzaWwtdGVjLmdy\n'.decode('base64')



More information about the Python-list mailing list