Hi Skip, thanks for the proto-PEP which makes for an interesting reading. While reading the PEP, I had these questions:
1) I understand the goal is to make CPython faster. But this is not stated explicitly. Is there a way to make this more explicit in the beginning, and also how this would be achieved ? 2) You write: "the five most frequently executed pure stack opcodes [...] accounted for 35% of all executed instructions." and "They are low-cost instructions". If the only optimisation is to get rid of 35% of instructions, but they are quite fast, the overall speed gain would be at most 35%, and probably much less. Is there a way to measure not only execution counts of such instructions , but also the time spent, in a typical benchmark ? 3) Would the RVM allow for additional optimisations, besides the ones in the preceding point ? 4) Did you run some time benchmark with your current implementation? 5) You write: "It failed for a number of reasons" (Victor Stinner's project) -> It would be interesting to quickly write down the main reasons why it failed, and how your proposed approach would prevent these failures. Regards, S. On Sat, Mar 20, 2021 at 4:54 PM Skip Montanaro <skip.montan...@gmail.com> wrote: > Back in the late 90s (!) I worked on a reimagining of the Python > virtual machine as a register-based VM based on 1.5.2. I got part of > the way with that, but never completed it. In the early 2010s, Victor > Stinner got much further using 3.4 as a base. The idea (and dormant > code) has been laying around in my mind (and computers) these past > couple decades, so I took another swing at it starting in late 2019 > after retirement, mostly as a way to keep my head in the game. While I > got a fair bit of the way, it stalled. I've picked it up and put it > down a number of times in the past year, often needing to resolve > conflicts because of churn in the current Python virtual machine. > Though I kept getting things back in sync, I realize this is not a > one-person project, at least not this one person. There are several > huge chunks of Python I've ignored over the past 20 years, and not > just the internals. (I've never used async anything, for example.) If > it is ever to truly be a viable demonstration of the concept, I will > need help. I forked the CPython repo and have a branch (register2) of > said fork which is currently synced up with the 3.10 (currently > master) branch: > > https://github.com/smontanaro/cpython/tree/register2 > > I started on what could only very generously be called a PEP which you > can read here. It includes some of the history of this work as well as > details about what I've managed to do so far: > > https://github.com/smontanaro/cpython/blob/register2/pep-9999.rst > > If you think any of this is remotely interesting (whether or not you > think you'd like to help), please have a look at the "PEP". Because > this covers a fair bit of the CPython implementation, chances to > contribute in a number of areas exist, even if you have never delved > into Python's internals. Questions/comments/pull requests welcome. > > Skip Montanaro > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/IUKZPH4ZSZ22RZFKMITQ3Q6A22P4BXWX/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier - http://linkedin.com/in/sfermigier Founder & CEO, Abilian - Enterprise Social Software - http://www.abilian.com/ Chairman, National Council for Free & Open Source Software (CNLL) - http://cnll.fr/ Founder & Organiser, PyParis & PyData Paris - http://pyparis.org/ & http://pydata.fr/
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7K3FORB4V7BDVCOIPRTRJAMIH2OZINQL/ Code of Conduct: http://python.org/psf/codeofconduct/