On 16 February 2011 22:48, Daniel Fischer
<[email protected]> wrote:
> The problem with that is that under certain circumstances the list is
> shared in nested loops, which was what caused the thread (it was mapM_ and
> not forM_, but I'd be very surprised if they behaved differently with -O2).

Yep - d'oh!

Thinking about it some more, this example is actually quite
interesting because if you *prevent* the list from being floated the
forM gets foldr/build fused into a totally listless optimal loop. It
really does seem like a shame to disable that optimisation because of
the floating... if only the fusion hit before float-out was run.

Max

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to