[issue4753] Faster opcode dispatch on gcc

Marc-Andre Lemburg report at bugs.python.org
Sat Dec 27 14:21:08 CET 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 2008-12-26 22:09, Antoine Pitrou wrote:
> This patch implements what is usually called "threaded code" for the
> ceval loop on compilers which support it (only gcc). The idea is that
> there is a separate opcode dispatch epilog at the end of each opcode,
> which allows the CPU to make much better use of its branch prediction
> capabilities. The net result is a 15-20% average speedup on pybench and
> pystone, with higher speedups on very tight loops (see below for the
> full pybench result chart).

Now I know why you want opcode stats in pybench :-)

This looks like a promising approach. Is is possible to backport
this change to Python 2.x as well ?

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4753>
_______________________________________


More information about the Python-bugs-list mailing list