[pypy-dev] Object model
vlindberg at verio.net
Fri Feb 14 05:09:15 CET 2003
It seems like an appropriate time to ask this:
I know that we want to preserve language semantics. However, are
bytecode-level semantics similarly to be preserved, especially because
bytecode isn't always portable between CPython versions?
More specifically, is a stack-based VM sacrosanct? The traditional
argument against register-based systems has been that they usually
increase compiled code size. However, storage and bandwidth are becoming
cheaper, and I think we could take advantage of "hardware" tricks like
conditional execution and mulitple dispatch to significantly increase
speed. In fact, we could take advantage of the fact that "memory"
accesses are just as cheap as "register" accesses for the PyPy VM and
even use a memory-memory architecture. That gives the highest code
density -- even higher than stack-based bytecode -- and still allows
most "hardware" tricks.
Finally, It allows for a nice abstraction of various parts of the
execution engine - the "Integer Functional Unit" could be highly
optimized, because it would always know that it was dealing with
integers. We wouldn't be stuck with machine types, though, we could
have a "String Functional Unit" just as easily.
More information about the Pypy-dev