[Shootout-list] Rule 30

John Skaller skaller@users.sourceforge.net
Mon, 23 May 2005 00:26:53 +1000


On Sat, 2005-05-21 at 10:58 +0100, Jon Harrop wrote:

> In theory, yes. In practice, I don't believe real programs will benefit from 
> that particular optimisation. 

Hmm ..

> Indeed, that optimisation isn't performed 
> explicitly by any compiler AFAIK. 

gcc certainly has a switch for invariant code motion..

> In the case of Haskell, it is simply a 
> side-effect of laziness (pun intended ;-).

Invariant code motion isn't done by Felix as such,
however it is likely to be a 'side-effect' of automatic
reordering based on dependencies .. which Felix does
already do to some extent.

-- 
John Skaller, skaller at users.sf.net
PO Box 401 Glebe, NSW 2037, Australia Ph:61-2-96600850 
Download Felix here: http://felix.sf.net