[MLton] cvs commit: fixed quadratic liveness for list constants

Stephen Weeks MLton@mlton.org
Wed, 30 Jun 2004 10:49:34 -0700

> I wonder how difficult it would be, and how often it would fire, to have an
> optimization which would catch that there were no side effects so that the
> order of evaluation could be reversed.

I would go for something simple: if all the expressions in the list
are non-expansive, then evaluate and build right-to-left.