[m-dev.] last call modulo construction in hlc.gc

Peter Ross pro at missioncriticalit.com
Mon Oct 10 18:00:01 AEST 2005

On Mon, Oct 10, 2005 at 12:18:21PM +1000, Zoltan Somogyi wrote:
> On 09-Oct-2005, Peter Ross <pro at missioncriticalit.com> wrote:
> > Why doesn't the last call modulo construction optimization work in the
> > hlc.gc grade?
> Because it is implemented directly in the LLDS code generator.
Would it be difficult to implement in the MLDS grades?

We use the hlc.par.gc grade here to implement a server as we need
to dynamically adjust the number of threads we're using to process
requests depending on the server load.  Unfortunately the low level
parallel grade only allows a fixed number of threads defined at startup.

In fact I would say the biggest problem we have in the server is the
lack of tail recursion in the library modules of Mercury, in particular,

A decently sized list of a couple of thousand elements, with the much
more constrained stack size of a thread quite often leads to stack
overflows, and it appears that sometimes the thread (under win32) can
fail silently leading to strange behaviour in our server, and bugs that
are difficult to track down.

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