[Vm-dev] Direct object pointers vs indirect ones pros and cons
siguctua at gmail.com
Fri Nov 12 08:05:28 UTC 2010
Hi , all
RoarVM using object tables, while Squeak VM using direct pointers for object.
This is a basic element of VM design, and i wonder, how much impact it
does on overall VM speed.
Both variants having own advantages/disadvantages, while i think, that
with good JIT an extra indirection could be
almost insignificant. But having indirect pointers to objects opens
quite sexy perspectives.
Being able to freely choose object(s) location means that:
- its quite easy to implement object memory paging (swapping between
memory and disc),
- place particular object(s) into special memory location (good for
FFI, object pinning etc)
- #become: is O(1), instead of O(heap size)
The downside of indirect pointers is, of course, a higher memory
traffic, which directly impacts all operations everywhere.
I'd like to know, what you thinking about it, and why Squeak VM, in
particular, using direct object pointers?
What are this choice based on? I'd like to know. Maybe i missing something.
Igor Stasenko AKA sig.
More information about the Vm-dev