<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/opcode.py, branch v2.6.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/opcode.py?h=v2.6.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/opcode.py?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2007-12-18T21:24:09Z</updated>
<entry>
<title>Give meaning to the oparg for BUILD_MAP:  estimated size of the dictionary.</title>
<updated>2007-12-18T21:24:09Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2007-12-18T21:24:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fd7ed407d79b797e20d0a6fe69e18f9ba9354979'/>
<id>urn:sha1:fd7ed407d79b797e20d0a6fe69e18f9ba9354979</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>
</entry>
<entry>
<title>Speed-up dictionary constructor by about 10%.</title>
<updated>2007-12-18T18:26:18Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2007-12-18T18:26:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=effde12f5fe41bab9c27269bd77237200d953afd'/>
<id>urn:sha1:effde12f5fe41bab9c27269bd77237200d953afd</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>
</entry>
<entry>
<title>PEP 343 -- the with-statement.</title>
<updated>2006-02-27T22:32:47Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2006-02-27T22:32:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c2e20744b2b7811632030470971c31630f0975e2'/>
<id>urn:sha1:c2e20744b2b7811632030470971c31630f0975e2</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>
</entry>
<entry>
<title>Install two code generation optimizations that depend on NOP.</title>
<updated>2004-06-21T16:31:15Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-06-21T16:31:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9c18e81fb23d60ea77bdf4f3c2649296f26e4a95'/>
<id>urn:sha1:9c18e81fb23d60ea77bdf4f3c2649296f26e4a95</id>
<content type='text'>
Reduces the cost of "not" to almost zero.
</content>
</entry>
<entry>
<title>SF patch #910929:  Optimize list comprehensions</title>
<updated>2004-03-07T07:31:06Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-03-07T07:31:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=dd80f762650f42f5f9ae820d9f55b21ed6f33bc0'/>
<id>urn:sha1:dd80f762650f42f5f9ae820d9f55b21ed6f33bc0</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>
</entry>
<entry>
<title>Replace backticks with repr() or "%r"</title>
<updated>2004-02-12T17:35:32Z</updated>
<author>
<name>Walter Dörwald</name>
<email>walter@livinglogic.de</email>
</author>
<published>2004-02-12T17:35:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=70a6b49821a3226f55e9716f32d802d06640cb89'/>
<id>urn:sha1:70a6b49821a3226f55e9716f32d802d06640cb89</id>
<content type='text'>
From SF patch #852334.
</content>
</entry>
<entry>
<title>Revert the previous enhancement to the bytecode optimizer.</title>
<updated>2003-04-24T05:45:23Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2003-04-24T05:45:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f4cf76dd5eabd8af5d2a866da1f75fa745aa6f29'/>
<id>urn:sha1:f4cf76dd5eabd8af5d2a866da1f75fa745aa6f29</id>
<content type='text'>
The additional code complexity and new NOP opcode were not worth it.
</content>
</entry>
<entry>
<title>Improved the bytecode optimizer.</title>
<updated>2003-04-22T06:49:11Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2003-04-22T06:49:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=060641d51160f6bf49a049bb677f8412b5a19de3'/>
<id>urn:sha1:060641d51160f6bf49a049bb677f8412b5a19de3</id>
<content type='text'>
* Can now test for basic blocks.
* Optimize inverted comparisions.
* Optimize unary_not followed by a conditional jump.
* Added a new opcode, NOP, to keep code size constant.
* Applied NOP to previous transformations where appropriate.

Note, the NOP would not be necessary if other functions were
added to re-target jump addresses and update the co_lnotab mapping.
That would yield slightly faster and cleaner bytecode at the
expense of optimizer simplicity and of keeping it decoupled
from the line-numbering structure.
</content>
</entry>
<entry>
<title>new opcode module - extract opcode definitions from dis.py - eventually</title>
<updated>2003-02-27T21:27:52Z</updated>
<author>
<name>Skip Montanaro</name>
<email>skip@pobox.com</email>
</author>
<published>2003-02-27T21:27:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3249ccd06a914eb12d197699d7f82db8573594fc'/>
<id>urn:sha1:3249ccd06a914eb12d197699d7f82db8573594fc</id>
<content type='text'>
should be generated automatically
</content>
</entry>
</feed>
