[Python-ideas] Register based interpreter

Antoine Pitrou solipsis at pitrou.net
Fri Feb 20 20:48:53 CET 2009

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...).



More information about the Python-ideas mailing list