[m-users.] Stackoverflow from --intermodule-optimisation

Julien Fischer jfischer at opturion.com
Wed Sep 25 16:42:09 AEST 2013


On Wed, 25 Sep 2013, Michael Day wrote:

>> It is reported to (comments in the manual) that it can slow programs down.
>> My guess is that this means the chance of slowing a program down is almost
>> as good as the chance that it'll speed up.
> Is there a canonical example of code that runs slower with this optimisation?
> What is the mechanism of the slowdown, just having more arguments to pass 
> down?

IIRC, when this variant of LCMC was orginally implemented it was found
to be causing a slowdown on our standard benchmark.  I'm not sure if
anyone ever determined what the cause was.  (Indeed, it would worth
re-running these benchmarks with the current compiler.)

> Unless the slowdown really is significant, I would still suggest enabling the 
> optimisation by default. Without it, code may run slightly faster up until 
> the point that it crashes by overflowing the stack :)

IMO, such code should be re-written to avoid the stack overflow.
Having your code rely on a particular optimization being enabled for
completeness is a terribly brittle approache.


More information about the users mailing list