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

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Aug 9 13:27:59 AEST 2005


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.

Cheers,
Julien.
--------------------------------------------------------------------------
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