[Python-Dev] Register-based VM [Was: Possible performance regression]
Guido van Rossum
guido at python.org
Tue Feb 26 16:42:29 EST 2019
Yes, this should totally be attempted. All the stack manipulation opcodes
could be dropped if we just made (nearly) everything use 3-address codes,
e.g. ADD would take the names of three registers, left, right and result.
The compiler would keep track of which registers contain a live object (for
reference counting) but that can't be much more complicated than checking
for stack under- and over-flow.
Also, nothing new indeed -- my first computer (a control data cyber
mainframe) had 3-address code.
On Tue, Feb 26, 2019 at 1:01 PM Neil Schemenauer <nas-python at python.ca>
> On 2019-02-26, Victor Stinner wrote:
> > I made an attempt once and it was faster:
> > https://faster-cpython.readthedocs.io/registervm.html
> Interesting. I don't think I have seen that before. Were you aware
> of "Rattlesnake" before you started on that? It seems your approach
> is similar. Probably not because I don't think it is easy to find.
> I uploaded a tarfile I had on my PC to my web site:
> It seems his name doesn't appear in the readme or source but I think
> Rattlesnake was Skip Montanaro's project. I suppose my idea of
> unifying the local variables and the registers could have came from
> Rattlesnake. Very little new in the world. ;-P
> Python-Dev mailing list
> Python-Dev at python.org
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev