[Vm-dev] Direct object pointers vs indirect ones pros and cons
Andreas Raab
andreas.raab at gmx.de
Fri Nov 12 08:25:49 UTC 2010
On 11/12/2010 12:05 AM, Igor Stasenko wrote:
> Both variants having own advantages/disadvantages, while i think, that
> with good JIT an extra indirection could be
> almost insignificant.
This ignores the cost of memory access.
> I'd like to know, what you thinking about it, and why Squeak VM, in
> particular, using direct object pointers?
Performance.
> What are this choice based on? I'd like to know. Maybe i missing something.
http://ftp.squeak.org/docs/OOPSLA.Squeak.html:
The Object Memory
The design of an object memory that is general and yet compact is not
simple. We all agreed immediately on a number of parameters, though. For
efficiency and scalability to large projects, we wanted a 32-bit address
space with direct pointers (i.e., a system in which an object reference
is just the address of that object in memory). The design had to support
all object formats of our existing Smalltalk. It must be amenable to
incremental garbage collection and compaction. Finally, it must be able
to support the "become" operation (exchange identity of two objects) to
the degree required in normal Smalltalk system operation. "... etc ..."
(also see the section on storage management)
And if in doubt drop a note to dan ingalls at sap dot com and you'll get
the answer straight from the source :-)
Cheers,
- Andreas
More information about the Vm-dev
mailing list