[mercury-users] Disjunctions vs. multiple head clauses

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Apr 8 07:26:05 AEST 2004


On 07-Apr-2004, Peter Hawkins <peter at hawkins.emu.id.au> wrote:
> Is there any difference in efficiency between the two predicates bar1
> and bar2 in the following?

No. One of the first things the compiler does is replace multiple clauses
with an explicit disjunction. After this step, there is no difference
between bar1 and bar2. The compiler will be able to do indexing on the
resulting code regardless of its original form.

Zoltan.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list