<div dir="ltr">Thanks, Julien. I'm assuming that I can just assign names to the integers and use those names to avoid memory usage. Robert Buckley</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 14, 2015 at 4:38 PM, Julien Fischer <span dir="ltr"><<a href="mailto:jfischer@opturion.com" target="_blank">jfischer@opturion.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Wed, 15 Apr 2015, Zoltan Somogyi wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, 14 Apr 2015 09:38:12 -0700, Delmas Buckley <<a href="mailto:rbuckley@ieee.org" target="_blank">rbuckley@ieee.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does anyone have any suggestions for speedup, other than "Avoid using<br>
Mercury for this purpose"?<br>
</blockquote>
<br>
You may want to consider eliminating the massive amounts of redundant<br>
computation that your code is doing, to wit, constructing the arbitrary-precision<br>
representations of your constants over and over and over and over and over ...<br>
Since each call to integer/1 allocates memory, I am not surprised that you<br>
ended up thrashing your machine.<br>
</blockquote>
<br></span>
Along those lines, the integer module already provides the constant<br>
functions integer.zero/0 and integer.one/1 which are equivalent to<br>
integer(0) and integer(1) respectively, but won't allocate memory.<br>
<br>
Cheers,<br>
Julien.<br>
</blockquote></div><br></div>