[m-users.] Too Slow

Delmas Buckley rbuckley at ieee.org
Wed Apr 15 09:33:06 AEST 2015


Thank you for the suggestions, Zoltan. Robert Buckley

On Tue, Apr 14, 2015 at 10:39 AM, Zoltan Somogyi <zoltan.somogyi at runbox.com>
wrote:

>
>
> On Tue, 14 Apr 2015 09:38:12 -0700, Delmas Buckley <rbuckley at ieee.org>
> wrote:
> > 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
> arbitrary-precision
> 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.
>
> Once you have done that, you may also want to consider using one of
> Mercury's
> profilers to find out where your program is spending its time or
> allocating its
> memory. That is what they are for.
>
> Zoltan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20150414/b1277b60/attachment.html>


More information about the users mailing list