Re: Optimized bytecode in exec statement

2010-02-01 Thread Steven D'Aprano
On Mon, 01 Feb 2010 22:19:43 -0300, Gabriel Genellina wrote: > En Mon, 01 Feb 2010 20:05:16 -0300, Hermann Lauer > escribió: > >> while trying to optimize some unpack operations with self compiling >> code I wondered howto invoke the optimization in the exec statement. >> Even starting with -O o

Re: Optimized bytecode in exec statement

2010-02-01 Thread Gabriel Genellina
En Mon, 01 Feb 2010 20:05:16 -0300, Hermann Lauer escribió: while trying to optimize some unpack operations with self compiling code I wondered howto invoke the optimization in the exec statement. Even starting with -O or -OO yields in Python 2.5.2 the same dis.dis code, which is appended

Re: Optimized bytecode in exec statement

2010-02-01 Thread Christian Heimes
Terry Reedy wrote: > Currently, as far as I know, -0 just removes asserts. -O (not -0) also sets __debug__ to False. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Optimized bytecode in exec statement

2010-02-01 Thread Terry Reedy
On 2/1/2010 6:05 PM, Hermann Lauer wrote: Dear All, while trying to optimize some unpack operations with self compiling code I wondered howto invoke the optimization in the exec statement. Even starting with -O or -OO yields in Python 2.5.2 the same dis.dis code, which is appended below. Curre

Optimized bytecode in exec statement

2010-02-01 Thread Hermann Lauer
Dear All, while trying to optimize some unpack operations with self compiling code I wondered howto invoke the optimization in the exec statement. Even starting with -O or -OO yields in Python 2.5.2 the same dis.dis code, which is appended below. My interest would be to reduce the LOAD_FAST ops