[m-users.] Too Slow
rbuckley at ieee.org
Wed Apr 15 13:37:48 AEST 2015
Thanks, Julien. I'm assuming that I can just assign names to the integers
and use those names to avoid memory usage. Robert Buckley
On Tue, Apr 14, 2015 at 4:38 PM, Julien Fischer <jfischer at opturion.com>
> On Wed, 15 Apr 2015, Zoltan Somogyi wrote:
> On Tue, 14 Apr 2015 09:38:12 -0700, Delmas Buckley <rbuckley at ieee.org>
>>> Does anyone have any suggestions for speedup, other than "Avoid using
>>> Mercury for this purpose"?
>> You may want to consider eliminating the massive amounts of redundant
>> computation that your code is doing, to wit, constructing the
>> representations of your constants over and over and over and over and
>> over ...
>> Since each call to integer/1 allocates memory, I am not surprised that you
>> ended up thrashing your machine.
> Along those lines, the integer module already provides the constant
> functions integer.zero/0 and integer.one/1 which are equivalent to
> integer(0) and integer(1) respectively, but won't allocate memory.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users