[Vm-dev] Re: Direct object pointers vs indirect ones pros and cons

Eliot Miranda eliot.miranda at gmail.com
Wed Oct 26 22:25:33 UTC 2011

On Wed, Oct 26, 2011 at 1:11 PM, Javier Burroni <javier.burroni at gmail.com>wrote:

> Igor Stasenko wrote:
> >
> > the first bench is kind-of 'measure time to access directly to objects'
> > the second one is 'measure indirect access'
> > and third is measure a loop overhead.
> >
> >
> Hi there,
> I've just arrived to this thread (thanks to Mariano), and I wanted to share
> some speculations:
> Having JIT'ed code with self (the oop of the actual object) in a register,
> and selfID (the id of self in the object table) in a second register.
> We have:
> accessing ivar: no extra cost
> method lookup:
> one extra indirection
> sends with MonomorphicInlineCache:
> no extra cost if implemented in an instance basis (checking against
> selfID).
> One indirection otherwise
> GC (MarkAndCompact):
> Faster (due to the removal of the threading process).

But taking a register away from e.g. the calling convention has costs,
especially on x86 (6 user registers).

But what is selfID?  Is that the object table index for self, or something
related to self's class or?

> saludos
> jb
> --
> View this message in context:
> http://forum.world.st/Direct-object-pointers-vs-indirect-ones-pros-and-cons-tp3039203p3942123.html
> Sent from the Squeak VM mailing list archive at Nabble.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20111026/574912cd/attachment.htm

More information about the Vm-dev mailing list