
March 5, 2008
7:35 p.m.
I've got a patch in http://bugs.python.org/issue2179 that optimizes the bytecode generated by a with statement by tucking the context_manager.__exit__ method onto the stack. It saves 2 opcodes, 8 bytes, and about .5us for each with block at the cost of an extra stack entry for the duration of the block. Since it's the first time I've touched the core of the compiler and interpreter, I'm hoping that someone can take a look before I check it in. Thanks! Jeffrey
6209
Age (days ago)
6209
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jeffrey Yasskin