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

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Oct 30 16:43:41 AEDT 2006


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.

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