[Python-Dev] Parrot -- should life imitate satire?
email@example.com (Skip Montanaro)
Mon, 30 Jul 2001 16:38:53 -0500
>>>>> "Eric" == Eric S Raymond <firstname.lastname@example.org> writes:
Eric> Tim Peters <email@example.com>:
>> The per-opcode fetch-decode-dispatch overhead is very high in SW too,
>> so a register VM can win simply by cutting the number of opcodes
>> needed to accomplish a given bit of useful work.
Eric> That's an interesting idea. OK, so possibly I was wrong -- I
Eric> hadn't considered that stack-push/stack-pop operations might
Eric> introduce overhead comparable to the order-of-magnitude speed
Eric> difference between registers and main memory in hardware. I'm
Eric> still skeptical, but my mind is open.
Order of magnitude increases? Maybe, maybe not. Still, something like
is going to be faster than
My original aim in considering a register-based VM was that it is easier to
track data flow and thus optimize out or rearrange operations to reduce the
Translating Python's stack-oriented VM into a register-oriented one was
fairly straightforward (at least it was back when I was fiddling with it -
pre-1.5). The main stumbling block was that pesky "from module import *"
statement. It could push an unknown quantity of stuff onto the stack, thus
killing my attempts to track the location of objects on the stack at compile