[Python-Dev] Peephole Optimization

Venkatraman S venkat83 at gmail.com
Thu Feb 19 14:53:12 CET 2009


Hi,

I was looking around possibilities of bytecode optimizations in cpython and
was looking at some older bugs. One of them being
issue#2499<http://bugs.python.org/issue2499>;
the following line
kind of confuses me and wasnt sure what exactly Raymond(et al) is planning,
as i presume
that bytecode optimizations are much _easier_ than optimizations in AST.

"Most of the peepholer is going to be migrated up the chain, after the AST
is generated,
but before the opcodes are generated."

If there are some optimizations that can be done in the bytecodes, then
'where' would be
the suggested place to incorporate the same; as i also see that some of the
more rudimentary
optimizations have been rejected in many of the patches.

Regards,
-V-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090219/a3c94468/attachment.htm>


More information about the Python-Dev mailing list