[mercury-users] Fact tables

Michael Day mikeday at yeslogic.com
Fri Jul 18 15:04:35 AEST 2003


> Best in what way?  Do you mean most efficient? 
> Or most readable/maintainable?

Best in this context meaning efficient, as the readability can be
determined by simple inspection of sample code, whereas the efficiency can
only be determined by either knowledge of the compiler or detailed
profiling, which requires writing all three versions instead of just one.

> So, in ordinary circumstances, I'd suggest using the semidet pred.
> If your application is performance-critical, and you know that this
> procedure will be called in the innermost loop of your application,
> then consider using the det function with sentinel value.

That is interesting, I didn't know that det functions were translated
directly to native functions in the MLDS backends. Perhaps this code does
deserve a little profiling after all, to compare the actual effect of the
different methods.

Thanks for your help,

Michael

-- 
YesLogic Prince prints XML!
http://yeslogic.com

--------------------------------------------------------------------------
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