<div dir="ltr">Hi David,<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 1, 2013 at 12:24 PM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jan 01, 2013 at 03:47:54PM +0000, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
> Nicolas Cellier uploaded a new version of Kernel to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Kernel-nice.725.mcz" target="_blank">http://source.squeak.org/trunk/Kernel-nice.725.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Kernel-nice.725<br>
> Author: nice<br>
> Time: 1 January 2013, 4:47:30.911 pm<br>
> UUID: 52a4994f-63bc-4f71-9f8f-6f2fad460bde<br>
> Ancestors: Kernel-nice.724<br>
><br>
> Fast-up large integer modulo operations (\\ and rem:)<br>
><br>
> Implementation notes:<br>
> Quotient and remainder are computed in a single LargeIntegersPlugin primitive (see digitDiv:neg:) so it's faster to just use it.<br>
> For LargeInteger with 64 bits or less, LargeInteger primitives (31 32 33) are faster than the plugin (especially in COG) so try them first.<br>
> This results in a 2x speed up of modulo operations in 4.2.5 VM (whatever bit length), and a 2x speed up in COG VM for bit length > 64.<br>
> There is a penalty of 15% in COG for #rem: when bit length <= 64 because there is no primitiveRem...<br>
> Well, I added primitiveRem and it is in both VM branches, but it has no primitive number assigned.<br>
> If we assign a primitive number (20 ?) we can expect a 5x speed up for rem and bitLength <= 64.<br>
<br>
Should we assign primitive number 20 to primitiveRemLargeIntegers? It is in<br>
the range of numbered primitives allocated for large integer prims, and is<br>
currently unused in both the interpreter VM and Cog.<br>
<br>
I can't think of any reason not to do this, so someone please speak up if<br>
it might cause problems.<br>
<br>
Eliot, is this ok for Cog and Newspeak etc?<br></blockquote><div><br></div><div>Fine by me. 20 isn't even used in Smalltalk-80 V2, and isn't by VisualWorks. Seems ideal.</div></div>-- <br>best,<div>Eliot</div>
</div></div>