[Python-Dev] Why is Bytecode the way it is? (original) (raw)

Bob Ippolito bob at redivi.com
Thu Jul 8 16:19:12 CEST 2004


On Jul 8, 2004, at 9:29 AM, Paul Prescod wrote:

Michael Hudson wrote:

Python's VM is currently a stack machine. There are arguments for making it a register machine, but if we want to do that, lets go the whole hog and not have some kind of half-assed hybrid. I'm not really talking about a register machine either. I don't understand why you would want to copy values from a heap in "main memory" into a register still in main memory to have the bytecodes operate on them to store to a register and then back to main memory. Perhaps we take the CPU analogy too far. Or perhaps there is something deep I misunderstand.

My guess is that register machines are a whole heck of a lot easier to JIT compile to efficient register CPU assembly code (at least on a platform that has more than 4 GPRs :).

-bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20040708/1deb0600/smime-0001.bin



More information about the Python-Dev mailing list