[m-dev.] Performance of collect

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 25 09:34:11 AEDT 2000


On 24-Sep-2000, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> | You're calling from C to Mercury.  In our current implementation (LLDS back-end),
> | this is fairly expensive.  
> 
> So what about the HLDS back-end then?
> 
> Is it ready to use?

Yes, but not for tracing -- currently it doesn't support the debugger.

> What would be its overhead? I suppose it does not explicitly make use of 
> registers etc., so there is no need to save and restore them with this back-end 
> no?

The overhead of `pragma export' for the MLDS back-end is very low
(just one extra function call).

However, for tracing, the MLDS back-end would need to be modified to
store all local variables for traced procedures in a struct, rather
than in registers; that would slow it down quite a bit.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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