<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython.git/Lib/opcode.py, branch v2.7</title>
<subtitle>
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/'/>
<entry>
<title>Issue #2333: Backport set and dict comprehensions syntax.</title>
<updated>2010-01-11T22:36:12+00:00</updated>
<author>
<name>Alexandre Vassalotti</name>
<email>alexandre@peadrop.com</email>
</author>
<published>2010-01-11T22:36:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=02b25797af54c08a5817952e9f9782b7711d6e82'/>
<id>02b25797af54c08a5817952e9f9782b7711d6e82</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #2335: Backport set literals syntax from Python 3.x.</title>
<updated>2010-01-09T23:35:54+00:00</updated>
<author>
<name>Alexandre Vassalotti</name>
<email>alexandre@peadrop.com</email>
</author>
<published>2010-01-09T23:35:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=15d9212416efb7d7bebe46a3755d9e8083fdf4b3'/>
<id>15d9212416efb7d7bebe46a3755d9e8083fdf4b3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add a SETUP_WITH opcode</title>
<updated>2009-05-25T13:13:44+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2009-05-25T13:13:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=b7b65919bf38f9b82f96d1b282a1bc03dfdc8241'/>
<id>b7b65919bf38f9b82f96d1b282a1bc03dfdc8241</id>
<content type='text'>
It speeds up the with statement and correctly looks up the special
methods involved.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It speeds up the with statement and correctly looks up the special
methods involved.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with</title>
<updated>2009-02-28T19:03:21+00:00</updated>
<author>
<name>Jeffrey Yasskin</name>
<email>jyasskin@gmail.com</email>
</author>
<published>2009-02-28T19:03:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=b54607ea2a7480a0e96c7262ce4af972aedaa1e0'/>
<id>b54607ea2a7480a0e96c7262ce4af972aedaa1e0</id>
<content type='text'>
POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing
a POP_TOP on each conditional and sometimes allows the peephole optimizer to
skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing
a POP_TOP on each conditional and sometimes allows the peephole optimizer to
skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #2183: Simplify and optimize bytecode for list comprehensions.</title>
<updated>2008-12-17T00:38:28+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2008-12-17T00:38:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=d16e7f54b66baa380488c8745d6b772da80e561a'/>
<id>d16e7f54b66baa380488c8745d6b772da80e561a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Give meaning to the oparg for BUILD_MAP:  estimated size of the dictionary.</title>
<updated>2007-12-18T21:24:09+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2007-12-18T21:24:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=d32fca3b63f9c44b9c5fc19464bfb0c7fcb21d31'/>
<id>d32fca3b63f9c44b9c5fc19464bfb0c7fcb21d31</id>
<content type='text'>
Allows dictionaries to be pre-sized (upto 255 elements) saving time lost
to re-sizes with their attendant mallocs and re-insertions.

Has zero effect on small dictionaries (5 elements or fewer), a slight
benefit for dicts upto 22 elements (because they had to resize once
anyway), and more benefit for dicts upto 255 elements (saving multiple
resizes during the build-up and reducing the number of collisions on
the first insertions).  Beyond 255 elements, there is no addional benefit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows dictionaries to be pre-sized (upto 255 elements) saving time lost
to re-sizes with their attendant mallocs and re-insertions.

Has zero effect on small dictionaries (5 elements or fewer), a slight
benefit for dicts upto 22 elements (because they had to resize once
anyway), and more benefit for dicts upto 255 elements (saving multiple
resizes during the build-up and reducing the number of collisions on
the first insertions).  Beyond 255 elements, there is no addional benefit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Speed-up dictionary constructor by about 10%.</title>
<updated>2007-12-18T18:26:18+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2007-12-18T18:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=4e2df0fecf585820d82b99bc6dae44d11d6da75a'/>
<id>4e2df0fecf585820d82b99bc6dae44d11d6da75a</id>
<content type='text'>
New opcode, STORE_MAP saves the compiler from awkward stack manipulations
and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem.

Old disassembly:
              0 BUILD_MAP                0
              3 DUP_TOP
              4 LOAD_CONST               1 (1)
              7 ROT_TWO
              8 LOAD_CONST               2 ('x')
             11 STORE_SUBSCR
             12 DUP_TOP
             13 LOAD_CONST               3 (2)
             16 ROT_TWO
             17 LOAD_CONST               4 ('y')
             20 STORE_SUBSCR

New disassembly:
              0 BUILD_MAP                0
              3 LOAD_CONST               1 (1)
              6 LOAD_CONST               2 ('x')
              9 STORE_MAP
             10 LOAD_CONST               3 (2)
             13 LOAD_CONST               4 ('y')
             16 STORE_MAP
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New opcode, STORE_MAP saves the compiler from awkward stack manipulations
and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem.

Old disassembly:
              0 BUILD_MAP                0
              3 DUP_TOP
              4 LOAD_CONST               1 (1)
              7 ROT_TWO
              8 LOAD_CONST               2 ('x')
             11 STORE_SUBSCR
             12 DUP_TOP
             13 LOAD_CONST               3 (2)
             16 ROT_TWO
             17 LOAD_CONST               4 ('y')
             20 STORE_SUBSCR

New disassembly:
              0 BUILD_MAP                0
              3 LOAD_CONST               1 (1)
              6 LOAD_CONST               2 ('x')
              9 STORE_MAP
             10 LOAD_CONST               3 (2)
             13 LOAD_CONST               4 ('y')
             16 STORE_MAP
</pre>
</div>
</content>
</entry>
<entry>
<title>PEP 343 -- the with-statement.</title>
<updated>2006-02-27T22:32:47+00:00</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2006-02-27T22:32:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=6cdf23984315241f0ccd2f181156a56bbd2e5ea9'/>
<id>6cdf23984315241f0ccd2f181156a56bbd2e5ea9</id>
<content type='text'>
This was started by Mike Bland and completed by Guido
(with help from Neal).

This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.

There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was started by Mike Bland and completed by Guido
(with help from Neal).

This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.

There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
</pre>
</div>
</content>
</entry>
<entry>
<title>Install two code generation optimizations that depend on NOP.</title>
<updated>2004-06-21T16:31:15+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-06-21T16:31:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=56337ae78c5868887f4aed2af8c597af00bb88e7'/>
<id>56337ae78c5868887f4aed2af8c597af00bb88e7</id>
<content type='text'>
Reduces the cost of "not" to almost zero.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduces the cost of "not" to almost zero.
</pre>
</div>
</content>
</entry>
<entry>
<title>SF patch #910929:  Optimize list comprehensions</title>
<updated>2004-03-07T07:31:06+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-03-07T07:31:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=969d80d1ecb1229f85c0c356b1bf693037bf35b2'/>
<id>969d80d1ecb1229f85c0c356b1bf693037bf35b2</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
