Hi Jan,
Jan Wielemaker schrieb:
> Each clause has a mask and a key. For the actually goal it also computes
> a mask and a key. Now, finding a candidate clause walks the linked list
> of clauses and does a simple and-and-compare to decide whether the
> clause is a candidate. It is guaranteed that if that simple check fails,
> unification will fail too, so it only starts running the clause if this
> check succeeds. The scan is quite fast, but linear.
>
I think I understand. So the index/1 directive just tells the system to
compute these masks for all clauses, correct?
Wouldn't it be a good idea to do this by default? Or are there any
disadvantages?
> Except that you wrote it exactly the wrong way around :-),
Right, of course. I meant it the other way around.
Thanks for explaining.
--lu
------------
For further info, please visit
http://www.swi-prolog.org/To unsubscribe, send a plaintext mail with "unsubscribe prolog <e-mail>"
in its body to
majordomo@...