#7507: loop fusion not working for Int32, Int64 as it does for Int ?
------------------------------------+---------------------------------------
  Reporter:  j.waldmann             |          Owner:                
      Type:  bug                    |         Status:  closed        
  Priority:  normal                 |      Milestone:                
 Component:  Compiler               |        Version:  7.6.1         
Resolution:  fixed                  |       Keywords:                
        Os:  Linux                  |   Architecture:  x86_64 (amd64)
   Failure:  None/Unknown           |     Difficulty:  Unknown       
  Testcase:  perf/should_run/T7507  |      Blockedby:                
  Blocking:                         |        Related:                
------------------------------------+---------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => fixed
  * testcase:  => perf/should_run/T7507


Comment:

 See also #4321.  Fixed by this patch to `base`:
 {{{
 commit 06e36c63fce9aef5d3d8d9efeab14263333d48bf
 Author: Simon Peyton Jones <simo...@microsoft.com>
 Date:   Mon Dec 24 14:44:31 2012 +0000

     Make sum and product INLINABLE

     This was causing the bad behaviour in Trac #7507,
     because 'sum' wasn't getting specialised to Int64.

     It also deals with Trac #4321, which had the same cause.

     This has a big effect on some nofib programs too:

 
--------------------------------------------------------------------------------
             Program           Allocs   Runtime   Elapsed  TotalMem
 ------------------------------------------------------------------------
          bernouilli            -2.6%     -2.0%     -2.0%     +0.0%
                fft2           -23.8%      0.09      0.09    -16.7%
               fluid            -4.4%      0.01      0.01     +0.0%
              hidden            -3.2%     +2.1%     +1.8%     +0.0%
           integrate           -38.0%    -47.7%    -47.7%     -1.0%
                x2n1           -30.2%      0.01      0.01    -50.0%
 ------------------------------------------------------------------------
                 Min           -38.0%    -47.7%    -47.7%    -50.0%
                 Max            +0.4%    +11.2%    +11.8%     +6.9%
      Geometric Mean            -1.3%     +0.2%     +0.2%     -0.8%

  Data/List.hs |    5 +++++
  1 file changed, 5 insertions(+)
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to