[m-dev.] Are fact_table pragmas still useful?

Zoltan Somogyi zs at csse.unimelb.edu.au
Tue May 3 16:42:02 AEST 2011


On 03-May-2011, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> Are fact_table pragmas still useful or has the functionality now
> been subsumed by other parts of the compiler?

It should have been subsumed, but not quite. The complexity of typechecking
large tables of facts is still substantially more than linear, because the
general typechecker carries around, as part of its current state, the types of
the variables representing the arguments of previous clauses. The typechecker
of fact tables checks clauses independently, and thus its complexity is linear.

There are probably also NlogN algorithms in other parts of the compiler.
For the values of N we are talking about the logN term can be significant,
as well as the significantly higher constant factors.

Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list