[m-users.] Performance of solutions module

Martin McDonough foolkingcrown at gmail.com
Sat Nov 3 06:50:56 AEDT 2018


 > Actually, I would advise against doing this. The code of solutions/2 has
to do
> something that cannot be done in pure Mercury: communicating information
> between different branches of a disjunction. It therefore has to use
impure code,
> even though the interface it is implementing has a pure semantics. This
works,
> but I wouldn't recommend the code to nonexperts.

I did look at the source, and saw this was how it worked.

It's not that it's hard to build the list myself, or make a fold predicate.
I figured
that solutions must use special functionality to get the decision points,
and so
it wasn't clear how fast that would be compared with doing the equivalent
myself with standard/public language features.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20181102/94c444ab/attachment.html>


More information about the users mailing list