<br><br><div class="gmail_quote">On Wed, Oct 26, 2011 at 1:11 PM, Javier Burroni <span dir="ltr">&lt;<a href="mailto:javier.burroni@gmail.com">javier.burroni@gmail.com</a>&gt;</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>
&gt;<br>
&gt; the first bench is kind-of &#39;measure time to access directly to objects&#39;<br>
&gt; the second one is &#39;measure indirect access&#39;<br>
&gt; and third is measure a loop overhead.<br>
&gt;<br>
&gt;<br>
<br>
</div>Hi there,<br>
I&#39;ve just arrived to this thread (thanks to Mariano), and I wanted to share<br>
some speculations:<br>
Having JIT&#39;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&#39;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>