[Python-Dev] Faster list comprehensions
Raymond Hettinger
raymond.hettinger at verizon.net
Fri Mar 3 18:26:06 CET 2006
[Collin Winter]
> I've just posted a patch to SF (python.org/sf/1442442) that I thought
> I'd bring to everyone's attention. Executive summary: by changing the
> behaviour of the unused LIST_APPEND opcode, it's possible to get a 16%
> speed boost for list comprehensions.
That was working fine in Py2.4. It appears to have gotten left out of the AST
compiler.
The patch as submitted needs to be revised to only modify the compiler. The
other changes were both unnecessary and incorrect -- those components should be
left as they were in Py2.4.
Raymond
More information about the Python-Dev
mailing list