[mercury-users] Compiler freezes for large fact_table?

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Thu Mar 23 01:21:00 AEDT 2006

Dear Zoltan, you replied:

>However, at the end of Sept 05, I fixed the compiler performance problem
>that caused us to introduce fact tables in the first place. Fact tables
>were a workaround for the fact that the compiler took forever to modecheck
>predicates defined by lots of clauses, because the mode analysis algorithm
>was quadratic in the number of clauses. The new algorithm is only NlogN,
>which for my main test case (8000 clauses of an arity 2 predicate) reduced
>compile time from 230 seconds to 14 seconds.
>Have you tried your original code without using fact tables but using
>a compiler from a release of the day from October or later?

Oh-my-goodness!  I just tried your suggestion on a "fact table" of 
5000 clauses, arity 4 (indexed on the first three arguments) without
the pragma (especially since one of the indices was a composite
term of a discriminated union type).  It worked fine.

You've saved me all manner of work-around work.  Thank you very
much.  I'm now removing the pragma from the original fact tables
and will see how that goes.

>If there is still a problem, it would be really helpful to have some
>version of the actual predicate definition that exhibits the problem.
>If your data is confidential, you can of course run it through some
>obfuscation filter.

This subsystem is a naive bayesian classifier, of general utility, so
I've already done the obfuscation step, and I working on a (small)
working paper on the classifier.  I'll post here when I've got that
together (including the classifier itself and the source training 
and test data sets).  If you'd like, I can also include the configuration
that causes this problem (but I consider that your recommendation
closes this issue for me).

Doug Auclair

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