mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
bff63f0343
commit
dd80f76265
6 changed files with 20 additions and 3 deletions
|
@ -21,6 +21,7 @@ extern "C" {
|
|||
|
||||
#define UNARY_INVERT 15
|
||||
|
||||
#define LIST_APPEND 18
|
||||
#define BINARY_POWER 19
|
||||
|
||||
#define BINARY_MULTIPLY 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue