On 9 April 2010 20:27, Hanno Schlichting <ha...@hannosch.eu> wrote:
> - Generally there's no real optimizations in the code and the current
> infrastructure makes them hard to write. Like generating efficient
> code for stuff like "var1 string:'static'". Or not filling the repeat
> variable if it isn't used inside a repeat block. Maybe I should try
> again harder, but I failed at both of these the last times I tried ;)

The approach we took was practical, or seemed practical. Maybe we
should have used a different strategy:

  - phase 1: generate high-level code that employs function calls
  - phase 2: inline function calls or similar expansion
  - phase 3: code optimization

Also, I realized while writing the ``curry`` library that things like
temporary variables can be dealt with very efficiently by subclassing
e.g. ``ast.Name`` into ``TemporaryName`` and simply extending the code

Repoze-dev mailing list

Reply via email to