<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi Eliot,</div><div class="gmail_quote">My only point is performance. GMP is highly optimized, it includes optimizations made by hand for each particular processor, so for example the multiplication of large enough integers should be much faster than our implementation in Slang. And it seems that we wouldn&#39;t need to change anything in the image or do any conversions or marshaling, just call the mpn_* low-level functions from the large integers plugin. But if we have to marshal everything it doesn&#39;t make much sense to use GMP, because it will be slower for relatively small large integers.</div><div class="gmail_quote"><br></div><div class="gmail_quote">I&#39;m working on computer algebra in Smalltalk and I&#39;d like to be competitive with other computer algebra systems (GAP, Magma, etc), and in many cases the bottleneck is large integer arithmetic.</div><div class="gmail_quote"><br></div><div class="gmail_quote">So I&#39;m very happy about the recent speed up using 32 bits legs and avoiding function calls for type checking. That will have an impact in my benchmarks. Thanks!</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Jul 13, 2016 at 12:52 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto">1. the existing code is functional and adequate.  GMP offers no new functionality and may offer performance improvements or may not.  But the existing code is capable of being tuned also.<div><br></div><div>2. The existing plugin is internal; with the &quot;new&quot; linkage I wrote two years ago now internal plugins have a much simpler call interface into the VM (no double calls through a pointer anymore; just direct calls on the VM functions). But LGPL forces us to make the plugin external.  Hence using GMP implies a loss of performance in marshaling arguments and allocating and returning results.</div><div><br></div><div>IMO these two together make GMP irrelevant.  Less compelling reasons are</div><div><br></div><div>3. Yet another library to install on all build environments; AFAIA it&#39;s not present on non-Linux platforms</div><div><br></div><div>4. Being a library we don&#39;t control we&#39;re dependent on others fixing it.</div><div><br></div><div>What reasons, other than brand identity are there for using GMP?</div><div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Could we use it if was already installed in the host platform? It seems to me that it would be quite straight forward to call to the GMP low-level API from the LargeIntegersPlugin, without making any changes in the image. <a href="https://gmplib.org/manual/Low_002dlevel-Functions.html" target="_blank">https://gmplib.org/manual/Low_002dlevel-Functions.html</a><br></div><div><br></div></div></div></div>
</div></blockquote></div></div><br></blockquote></div><br></div></div>