<div dir="ltr">Hi Esteban,<div><br></div><div>    you can set up a test using the LargeInteger comparison primitives.  They&#39;re both named and numberd.  e.g.</div><div><br></div><div>23 primitiveLessThanLargeIntegers<br></div><div><br></div><div>So you can write e.g.</div><div><br></div><div><div>LargePositiveInteger&gt;&gt;#&lt; anInteger </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;Primitive. Compare the receiver with the argument and answer true if</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>the receiver is less than the argument. Otherwise answer false. Fail if the</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>argument is not a SmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824).</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Optional. See Object documentation whatIsAPrimitive.&quot;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;primitive: 23&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^super &lt; anInteger</div></div><div><br></div><div>as</div><div><br></div><div><div>numberedLessThan: anInteger </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;Primitive. Compare the receiver with the argument and answer true if</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>the receiver is less than the argument. Otherwise answer false. Fail if the</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>argument is not a SmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824).</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Optional. See Object documentation whatIsAPrimitive.&quot;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;primitive: 23&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^super &lt; anInteger</div></div><div><br></div><div><div><br></div><div><div>namedLessThan: anInteger </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;Primitive. Compare the receiver with the argument and answer true if</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>the receiver is less than the argument. Otherwise answer false. Fail if the</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>argument is not a SmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824).</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Optional. See Object documentation whatIsAPrimitive.&quot;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;primitive: &#39;primitiveLessThanLargeIntegers&#39;&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^super &lt; anInteger</div></div></div><div><br></div><div>and test it with two suitable large integers.  Will you report back?  I&#39;d like to know the answer.  Named primitive invocation should be slightly slower.  As Clément says, a return different address is written to the stack, overwriting the primitive code, but that return path is essentially the same as for numbered primtiives.  So I expect that there will be almost no measurable difference.</div><div><br></div><div>This is all to do with callbacks.  Numbered primitives are assumed never to callback (so far that&#39;s a valid assumption).  But named primitives (such as an FFI call) may indeed callback and hence, by the time the primitive finally returns the code zone may have been compacted and the original method containing the callout may have moved.  So the VM can&#39;t simply return to a primitive that may have called back, and then have that primitive&#39;s code return form the primitive, because that codee may have moved.  The solution is to provide a piece of code at a fixed address that returns from a named primitive call, and have the return sequence run that code.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 22, 2015 at 5:13 AM, Esteban Lorenzano <span dir="ltr">&lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@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"><br>
Hi,<br>
<br>
Any idea how slower is? I mean, any measure/estimation/something around?<br>
<br>
cheers,<br>
Esteban<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div>