<div dir="ltr"><div><div><div>IMO, reversing the tag value (0/1) doesn&#39;t changes much..<br></div>And camp division between two reminds me big vs little endian fights <br></div>described by Jonathan Swift :)<br><br></div>
If we wanna gain more performance, i think we should put our attention to another place(s).<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 14 November 2013 15:14, Jecel Assumpcao Jr. <span dir="ltr">&lt;<a href="mailto:jecel@merlintec.com" target="_blank">jecel@merlintec.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Eliot Miranda wrote:<br>
&gt; On Tue, Nov 12, 2013 at 3:56 AM, Clément Bera wrote:<br>
&gt; &gt; By the way as you are talking about Immediate objects tags and Spur&#39;s object<br>
&gt; &gt; representation, I read on other VMs reports that it is faster in overall performance<br>
&gt; &gt; to have pointers tagged with the xxx1 and SmallIntegers tagged with xxx0,<br>
&gt; &gt; because SmallIntegers arithmetics is then much faster.<br>
&gt;<br>
&gt; I&#39;m sure that was true 20 years ago when register operations were about the<br>
&gt; same speed as memory operations.  But now that memory operations are at<br>
&gt; least an order of magnitude slower I suspect that adjusting the tags (all register<br>
&gt; operations) are in the noise.  But I agree it *would* be interesting to measure.<br>
<br>
Another issue is that the 680x0 had addressing modes that aren&#39;t common<br>
on current processors. Having SmallIntegers be xxx0 means you don&#39;t have<br>
to untag them to add or subtract and then retag them. Shifts and<br>
multiplies require a single scaling factor beyond the basic operation.<br>
But the xxx1 for OOPs introduce complications: if you are going to<br>
access a fixed instance variable, for example instance variable 3, then<br>
you can deal with it at assembly time:<br>
<br>
  MOVE.L (-1+4*(3+1),A5),D1 ; where A5 is the OOP<br>
<br>
But if you are going to access a field in an Array then you have to do<br>
it at runtime:<br>
<br>
  MOVE.L (-1+4*FixedFields,A5,D2*4),D1  ; where A5 is the OOP and D2 is<br>
the index<br>
<br>
While it takes several instructions to do the same thing on a current<br>
processor, the 680X0 took quite a few clock cycles to execute the single<br>
instruction above and it took several words in memory to encode it, so<br>
the gain was mostly imaginary.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Jecel<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Igor Stasenko.
</div>