[GHC] #6082: Program compiled with 7.4.1 runs many times slower than compiled with 7.2.2

GHC cvs-ghc at haskell.org
Wed Jul 18 17:32:45 CEST 2012


#6082: Program compiled with 7.4.1 runs many times slower than compiled with 7.2.2
--------------------------------------+-------------------------------------
  Reporter:  gchrupala                |          Owner:  simonpj         
      Type:  bug                      |         Status:  new             
  Priority:  high                     |      Milestone:  7.4.3           
 Component:  libraries (other)        |        Version:  7.4.1           
Resolution:                           |       Keywords:                  
        Os:  Unknown/Multiple         |   Architecture:  Unknown/Multiple
   Failure:  Runtime performance bug  |     Difficulty:  Unknown         
  Testcase:                           |      Blockedby:                  
  Blocking:                           |        Related:                  
--------------------------------------+-------------------------------------

Comment(by simonpj):

 Aha!  It is very very very fragile to expect a RULE to fire if there is a
 directly ocmpeting INLINE.
 {{{
 {-# RULE "blah"  f (g x) = ... #-}
 {-# INLINE f #-}
 }}}
 The INLINE can, and for reliability '''must''', be postponed to allow the
 RULE to fire.
 {{{
 {-# RULE "blah"  f (g x) = ... #-}
 {-# INLINE[1] f #-}
 }}}
 So this is the real solution.  Ian or Paolo, can you add phases to the
 INLINE for `unsafeFreeze` and `unsafeThaw`?

 We should really check that three is no more of this nonsense.  GHC should
 really warn if we have a RULE on a function that does not have delayed
 inlining.

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



More information about the Glasgow-haskell-bugs mailing list