On 17/11/2010, at 17:32, Simon Peyton-Jones wrote:

> Why has the behavior changed?  Because it depends whether eta-expansion 
> happens before float-out.  Now it does.  I could change that back.  The eta 
> expander knows that (sc_sel d) is cheap, so it turns it into this
> exp = /\a. \d.\x.  let d1 = sc_sel d in  ....(fromInteger d1 3)....
> and now again the floater can do nothing.

Couldn't this be handled by what you suggested for 
http://hackage.haskell.org/trac/ghc/ticket/2607?

> I think this is a bit of an unusual case.  But in any case, there is a better 
> solution: make (^) INLINABLE so that it'll specialise.  That makes the 
> original test work twice as fast.  I believe I have pushed a ptach to this 
> effect

I'm not sure it's that unusual. I remember complaining about GHC not floating 
method selectors out of loops. I this we even had an email discussion about 
this a couple of months ago.

Roman


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to