[m-users.] Too Slow

Matthias Guedemann matthias.guedemann at googlemail.com
Fri May 1 17:52:14 AEST 2015


Hi,

> Hi, Matthias, I may have encountered a
> failure-to-release-no-longer-needed-memory in a test I ran that I'll
> review in the morning, as I'm very tired now.

here is an updated version using Peter's hints, i.e., all mallocs are
replaced by Mercury macros and allocated memory is known to the
GC. Therefore there is no unreferenced memory left at the end. 

In addition, squaring is faster then before, via the call to mp_square
instead of direct multiplication.

There's still no error checking though.

Best regards,
Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp_int.m
Type: application/octet-stream
Size: 8151 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20150501/389aac98/attachment.obj>


More information about the users mailing list