diff Lib/opcode.py @ 31618:bc006682acb2 legacy-trunk

SF patch #910929: Optimize list comprehensions Add a new opcode, LIST_APPEND, and apply it to the code generation for list comprehensions. Reduces the per-loop overhead by about a third.
author Raymond Hettinger <python@rcn.com>
date Sun, 07 Mar 2004 07:31:06 +0000
parents 71a294bd7950
children 6bc6abba8659
line wrap: on
line diff
--- a/Lib/opcode.py	Fri Mar 05 14:33:21 2004 +0000
+++ b/Lib/opcode.py	Sun Mar 07 07:31:06 2004 +0000
@@ -56,6 +56,7 @@
 
 def_op('UNARY_INVERT', 15)
 
+def_op('LIST_APPEND', 18)
 def_op('BINARY_POWER', 19)
 
 def_op('BINARY_MULTIPLY', 20)