<br><br><div class="gmail_quote">On Wed, Oct 26, 2011 at 1:11 PM, Javier Burroni <span dir="ltr"><<a href="mailto:javier.burroni@gmail.com">javier.burroni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
<br>
Igor Stasenko wrote:<br>
><br>
> the first bench is kind-of 'measure time to access directly to objects'<br>
> the second one is 'measure indirect access'<br>
> and third is measure a loop overhead.<br>
><br>
><br>
<br>
</div>Hi there,<br>
I've just arrived to this thread (thanks to Mariano), and I wanted to share<br>
some speculations:<br>
Having JIT'ed code with self (the oop of the actual object) in a register,<br>
and selfID (the id of self in the object table) in a second register.<br>
We have:<br>
accessing ivar: no extra cost<br>
method lookup:<br>
one extra indirection<br>
sends with MonomorphicInlineCache:<br>
no extra cost if implemented in an instance basis (checking against selfID).<br>
One indirection otherwise<br>
<br>
GC (MarkAndCompact):<br>
Faster (due to the removal of the threading process).<br></blockquote><div><br></div><div>But taking a register away from e.g. the calling convention has costs, especially on x86 (6 user registers). </div><div><br></div>
<div>But what is selfID? Is that the object table index for self, or something related to self's class or?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
saludos<br>
jb<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/Direct-object-pointers-vs-indirect-ones-pros-and-cons-tp3039203p3942123.html" target="_blank">http://forum.world.st/Direct-object-pointers-vs-indirect-ones-pros-and-cons-tp3039203p3942123.html</a><br>
Sent from the Squeak VM mailing list archive at Nabble.com.<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>