[mercury-users] Destructive list operations

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jan 12 16:01:14 AEDT 2009

On Mon, 12 Jan 2009, Michael Day wrote:

> By the way, the --optimize-constructor-last-call flag allows us to drop a lot 
> of the reverse-accumulator tricks we were using and get a speed boost into 
> the bargain. It's great! But it doesn't seem to be enabled by default for 
> -O5, is that correct? Is there any reason why it wouldn't be enabled for this 
> optimisation level? It seems pretty useful; we only didn't use it in the past 
> because it made the 2006 compiler crash.

The last time it was benchmarked on our usual benchmark program (the
compiler compiling its six largest modules), it sometimes resulted in
a slowdown - that's why it's not currently enabled by one of the -O

We should re-run those benchmarks (in fact I will), since there have
been a number of bugfixes made to lco since then.  In any, case I
think lco is worth enabling by default, since it helps in
avoiding stack overflows.  (Given that the old introduce accumulators
option was enabled at -O3, I think lco should be as well.)

mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au

More information about the users mailing list