[Python-Dev] Bytecode analysis

Neil Schemenauer nas@python.ca
Tue, 25 Feb 2003 15:50:37 -0800


Christian Tismer wrote:
> Where you really can save some time is to shortcut some
> of the very short opcodes to not jump back to the ticker
> counting code, but into a shorter circle.

2.2 -> 2.3 includes this optimization for some opcodes.

> Not trying to demoralize you completely, but there are
> limits about what can be gathered by optimizing the
> interpreter loop. There was once the p2c project, which
> gave an overall improvement of 25-40 percent, by totally
> removing the interpreter loop.

Yes, but p2c was probably not nice to the icache.  I doubt 25-40% is
an upper bound.  Memory bandwidth really sucks now (relatively
speaking).  I think reference counting is now starting to look like a
smart design (in terms of performance). :-)

  Neil