[GHC] #2465: View + Pattern Match not fused sufficiently

GHC trac at galois.com
Fri Aug 1 14:02:58 EDT 2008


#2465: View + Pattern Match not fused sufficiently
------------------------------------------+---------------------------------
 Reporter:  ryani                         |          Owner:         
     Type:  compile-time performance bug  |         Status:  new    
 Priority:  normal                        |      Milestone:         
Component:  Compiler                      |        Version:  6.8.2  
 Severity:  normal                        |     Resolution:         
 Keywords:                                |     Difficulty:  Unknown
 Testcase:                                |   Architecture:  x86    
       Os:  Windows                       |  
------------------------------------------+---------------------------------
Comment (by ryani):

 Also, to answer your question directly... what in the core should be
 different?

 The list thunk allocations in
 [http://hackage.haskell.org/trac/ghc/attachment/ticket/2465/plzoptimize.core#L490
 $sdnaView (line 490)] and
 [http://hackage.haskell.org/trac/ghc/attachment/ticket/2465/plzoptimize.core#L521
 dnaView (line 521)] immediately get destructed by
 [http://hackage.haskell.org/trac/ghc/attachment/ticket/2465/plzoptimize.core#L386
 $wconsts (line 386)], causing a lot of allocator churn.

 If those two functions are fused, as they are in optConsts, the code runs
 ~5-10x faster (from my recollection).

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


More information about the Glasgow-haskell-bugs mailing list