[m-dev.] Tabling methods

Oliver Hutchison ohutch at students.cs.mu.OZ.AU
Mon Mar 16 15:54:58 AEDT 1998


On Fri, 13 Mar 1998, Fergus Henderson wrote:

> 
> On 13-Mar-1998, Oliver Hutchison <ohutch at students.cs.mu.oz.au> wrote:
> > Ok so you want :
> > 	
> > 	`loop_check'
> > 	`memo_loop_check'
> > 	`memo'
> > 	`minimal'
> 
> Modulo spelling, yes.
> 
> I would spell the second one `memo_and_loop_check'
> and the fourth `minimal_model'.
> 
> Actually, come to think of it, it would probably be better to make
> `memo' imply loop checking by default; that is, to spell
> the second one `memo' and the third `memo_without_loop_check'.
> We don't want to encourage people to use the
> slightly-more-efficient-but-less-safe method by default,
> and that is what they will do if it is fewer characters to type.
> The default should be slightly-less-efficient-but-safe, and the
> slightly-more-efficient-but-less-safe method should be used
> only if you're really trying to squeeze out that last drop of
> performance.
> 

Ok. We have :
	`loop_check'
	`memo'
	`memo_without_loop_check'
	`minimal_model'

I will go and do it. But should I disable the loop check in the
`memo_without_loop_check' case if there is no speed penalty? The only case
where I can see a way of gaining a recordable speed bonus is model_det
with one output argument and one or two builtin type input arguments, even
then I suspect any gain would be marginal. All we are saving is one 1 word
heap allocation and one test for the first call to the subgoal and then
one de-reference for each subsequent call to the subgoal.

I really favour loosing the `memo_without_loop_check' case.





More information about the developers mailing list