#5113: Huge performance regression of 7.0.2, 7.0.3 and HEAD over 7.0.1 and 6.12
(MonoLocalBinds)
--------------------------------------------+-------------------------------
    Reporter:  daniel.is.fischer            |        Owner:                     
    
        Type:  bug                          |       Status:  new                
    
    Priority:  normal                       |    Milestone:                     
    
   Component:  Compiler                     |      Version:  7.0.3              
    
    Keywords:  performance, MonoLocalBinds  |     Testcase:                     
    
   Blockedby:                               |   Difficulty:                     
    
          Os:  Linux                        |     Blocking:                     
    
Architecture:  x86                          |      Failure:  Runtime 
performance bug
--------------------------------------------+-------------------------------

Comment(by daniel.is.fischer):

 Yes, it is polymorphic, but it's a local binding inside a runST, only ever
 used at the one specific type coming from the enclosing ST-action. Up to
 and including 7.0.1, it was automatically inlined, resulting in
 {{{
 case GHC.Prim.readIntArray#
        @ s_aKv marr#_aLG sc1_sSa sc_sS9
 of _ { (# s2#1_aPz, e#_aPA #) ->
 case GHC.Prim.writeIntArray#
        @ s_aKv
        marr#_aLG
        sc1_sSa
        (GHC.Prim.+# e#_aPA 1)
        s2#1_aPz
 of s2#2_aQ2 { __DEFAULT ->
 }}}
 at the appropriate places. 7.0.2, 7.0.3 and HEAD (29.3. - I've not yet
 built a newer HEAD to see whether it changed) produce the polymorphic
 worker that's then called.

 As for specific modules, I've not yet managed to produce a small example
 exhibiting exactly that, but for the small `Test.hs` module, 7.0.3
 produces bad (polymorphic) core while HEAD (and 7.0.1) do fine. However,
 for the `display` bundle (the interesting module is `DispFloat`), HEAD
 also produces the polymorphic `$winc`.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5113#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