A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-August/121344.html below:

[Python-Dev] AST optimizer implemented in Python

[Python-Dev] AST optimizer implemented in Python [Python-Dev] AST optimizer implemented in PythonHrvoje Niksic hrvoje.niksic at avl.com
Tue Aug 14 17:09:13 CEST 2012
On 08/14/2012 03:32 PM, Victor Stinner wrote:
>>  I had the idea (perhaps not an original one) that peephole optimization would be much better
>>  done in python than in C.  The C code is clunky and unwieldly, wheras python would be much
>>  better suited, being able to use nifty regexes and the like.
>>
>>  The problem is, there exists only bytecode disassembler, no corresponding assembler.
>
> Why would you like to work on bytecode instead of AST? The AST
> contains much more information, you can implement better optimizations

AST allows for better high-level optimizations, but a real peephole 
optimization pass is actually designed to optimize generated code.  This 
allows eliminating some inefficiencies which would be fairly hard to 
prevent at higher levels - wikipedia provides some examples.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4