#5068: Possible loss of sharing: big performance change
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:  7.4.1       
   Component:  Compiler          |      Version:  7.0.3       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by bos):

 Replying to [comment:1 simonmar]:

 > If you say `INLINE` on a redex, GHC will happily do as you ask, won't
 it?  I took a quick look at the diff that Bryan pointed to, and it looks
 like the problem is `ratios` being inlined in `loop`, which is a monadic
 computation and therefore probably a lambda.

 I agree. Although I didn't think to check when I first wrote the code,
 when it occurred to me that there might be a performance problem, the
 computation of `ratios` was the very first thing I thought to look at. In
 other words, GHC's behaviour here was maybe a little unfortunate, but it
 wasn't unexpected (admittedly by a fairly sophisticated user).

 I can submit a test case if that would be useful.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5068#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to