<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/opcode_targets.h, branch 3.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/opcode_targets.h?h=3.1</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/opcode_targets.h?h=3.1'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2010-05-09T16:14:21Z</updated>
<entry>
<title>Recorded merge of revisions 81032 via svnmerge from</title>
<updated>2010-05-09T16:14:21Z</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2010-05-09T16:14:21Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7f14f0d8a0228c50d5b5de2acbfe9a64ebc6749a'/>
<id>urn:sha1:7f14f0d8a0228c50d5b5de2acbfe9a64ebc6749a</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines

  Recorded merge of revisions 81029 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

    Untabify C files. Will watch buildbots.
  ........
................
</content>
</entry>
<entry>
<title>http://bugs.python.org/issue4715</title>
<updated>2009-02-25T02:25:04Z</updated>
<author>
<name>Jeffrey Yasskin</name>
<email>jyasskin@gmail.com</email>
</author>
<published>2009-02-25T02:25:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9de7ec7868554e92700e4bda6c5f9d8fcad634dc'/>
<id>urn:sha1:9de7ec7868554e92700e4bda6c5f9d8fcad634dc</id>
<content type='text'>
This patch by Antoine Pitrou optimizes the bytecode for conditional branches by
merging the following "POP_TOP" instruction into the conditional jump.  For
example, the list comprehension "[x for x in l if not x]" produced the
following bytecode:

  1           0 BUILD_LIST               0
              3 LOAD_FAST                0 (.0)
        &gt;&gt;    6 FOR_ITER                23 (to 32)
              9 STORE_FAST               1 (x)
             12 LOAD_FAST                1 (x)
             15 JUMP_IF_TRUE            10 (to 28)
             18 POP_TOP
             19 LOAD_FAST                1 (x)
             22 LIST_APPEND              2
             25 JUMP_ABSOLUTE            6
        &gt;&gt;   28 POP_TOP
             29 JUMP_ABSOLUTE            6
        &gt;&gt;   32 RETURN_VALUE

but after the patch it produces the following bytecode:

  1           0 BUILD_LIST               0
              3 LOAD_FAST                0 (.0)
        &gt;&gt;    6 FOR_ITER                18 (to 27)
              9 STORE_FAST               1 (x)
             12 LOAD_FAST                1 (x)
             15 POP_JUMP_IF_TRUE         6
             18 LOAD_FAST                1 (x)
             21 LIST_APPEND              2
             24 JUMP_ABSOLUTE            6
        &gt;&gt;   27 RETURN_VALUE

Notice that not only the code is shorter, but the conditional jump
(POP_JUMP_IF_TRUE) jumps right to the start of the loop instead of going through
the JUMP_ABSOLUTE at the end. "continue" statements are helped
similarly.

Furthermore, the old jump opcodes (JUMP_IF_FALSE, JUMP_IF_TRUE) have been
replaced by two new opcodes:
- JUMP_IF_TRUE_OR_POP, which jumps if true and pops otherwise
- JUMP_IF_FALSE_OR_POP, which jumps if false and pops otherwise
</content>
</entry>
<entry>
<title>Issue #4753: By enabling a configure option named '--with-computed-gotos'</title>
<updated>2009-01-25T16:34:23Z</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2009-01-25T16:34:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b52ec78baf236272800017fdb2b7f243741c1851'/>
<id>urn:sha1:b52ec78baf236272800017fdb2b7f243741c1851</id>
<content type='text'>
on compilers that support it (notably: gcc, SunPro, icc), the bytecode
evaluation loop is compiled with a new dispatch mechanism which gives
speedups of up to 20%, depending on the system, on various benchmarks.
</content>
</entry>
</feed>
