[m-users.] Performance of solutions module

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Nov 1 18:08:32 AEDT 2018



On Wed, 31 Oct 2018 13:58:51 -0700, Martin McDonough <foolkingcrown at gmail.com> wrote:
> What are the performance implications for using the solutions module
> (particularly solutions. solutions/2). If it's possible to construct a list
> of solutions iteratively, will this usually be measurably faster than the
> predicates from the solutions module

If you can construct a list of solutions directly, that will usually be faster
than using solutions/2, since the latter has nontrivial overhead. Whether
it will be *measurably* faster depends on what fraction of the program's
overall runtime this task takes, and on whether your direct method
for construction of solutions requires a post-pass to sort the solutions,
or to eliminate duplicates (two tasks that solutions/2 does for you,
and which form part of its overheads).

Zoltan.


More information about the users mailing list