[m-rev.] diff: --optimize-constructor-last-call for list.m and tree234.m

Peter Ross pro at missioncriticalit.com
Mon Oct 30 17:19:13 AEDT 2006


On 10/30/06, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> On Mon, 30 Oct 2006, Peter Ross wrote:
>
> > On 10/30/06, Zoltan Somogyi <zs at csse.unimelb.edu.au> wrote:
> >> library/Mercury.options:
> >>         Turn on --optimize-constructor-last-call for list.m and tree234.m.
> >>
> >>         In the following, version 1 is with the original parameters,
> >> version 2
> >>         is with --optimize-constructor-last-call for list.m only, version 3
> >>         is with --optimize-constructor-last-call for both modules.
> >>
> >>         mercury_compile.01 average of 12 with ignore=1     20.44
> >>         mercury_compile.02 average of 12 with ignore=1     19.99
> >>         mercury_compile.03 average of 12 with ignore=1     19.83
> >>
> > In my opinion all library modules should be compiled with
> > --optimize-constructor-last-call
> > as running slower is preferable to running out of stack.
>
> If you want to ensure that you don't run out of stack with those
> predicates that can avoid it using --optimize-constructor-last call then
> it needs to be enabled by default for everything; otherwise some of the
> opt imported predicates used by higher-order specialisation, and that
> are candidates for this optimization, will be missed.
>
Is that remark addressed to me or to zs?

If it is to me, the point I was trying to make is that occasionally my
programs run out of stack in the library modules, which requires that
one recompile the library for things to work.

Thanks however for the information that one has to do it for all
modules to avoid problems with higher-order specialisation, that
would've been hard to track down.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list