[m-dev.] [zs at cs.mu.oz.au: Re: tabled_for_io interacts badly with c code which contains labels]

Peter Ross pro at missioncriticalit.com
Tue Aug 9 15:57:17 AEST 2005


On Tue, Aug 09, 2005 at 01:27:59PM +1000, Julien Fischer wrote:
> 
> On Tue, 9 Aug 2005, Zoltan Somogyi wrote:
> 
> > I accidentally sent this to Ian only.
> >
> > Zoltan.
> >
> > ----- Forwarded message from Zoltan Somogyi <zs at cs.mu.oz.au> -----
> >
> > Date: Tue, 9 Aug 2005 12:30:56 +1000
> > From: Zoltan Somogyi <zs at cs.mu.oz.au>
> > To: Ian MacLarty <maclarty at cs.mu.OZ.AU>
> > Subject: Re: tabled_for_io interacts badly with c code which contains labels
> >
> > On 08-Aug-2005, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> > > Zoltan, could we wrap the original code in a procedure,
> >
> > In many cases, the body is much cheaper to execute than a function call,
> > so that would be a significant performance loss. However, there is no reason
> > why the author of the foreign_proc can't use that technique where it is
> > needed.
> >
> 
> I suggest that we make IO tabling respect pragma no_inline, i.e
> it only wraps the original procedure if it has a pragma no_inline.
> 
> The reference manual recommends that C code containing labels should
> have such a pragma anyway.
> 
I agree with Julien, wrap it with a procedure if the predicate is marked with
no_inline.  We can also make the macro option available, for those people who
are worried about performance.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list