[Python-ideas] Register based interpreter

Collin Winter collinw at gmail.com
Fri Feb 20 21:46:23 CET 2009

On Fri, Feb 20, 2009 at 11:48 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Leonardo Santagada <santagada at ...> writes:
>> Antonio Cuni made some experiments on PyPy about this, If you ask at
>> the pypy-dev mailing list or on irc (#pypy on freenode.net) he or
>> others can explain what happened. If I remember correctly there
>> weren't any significant improvements in performance as dispatch and
>> memory copies is not the problem on python, the bytecodes are very
>> complex.
> If bytecode dispatch were not a problem, I wonder how enabling computed gotos on
> the py3k branch could yield up to a 15% overall speedup on pybench :-)
> The biggest complication I can think of with a register-based VM is that you
> have to decref objects as soon as they aren't used anymore, which means you have
> to track the actual lifetime of registers (while it's done automatically with a
> stack-based design). I don't know how much it could slow down an implementation
> (perhaps not at all, if a clever implementation is devised...).

FYI, some relevant reading on converting a stack-based JVM to use
register-based bytecode:

Collin Winter

More information about the Python-ideas mailing list