[GHC] #14208: Performance with -O2 is worse than with -O0 which is worse than runghc

GHC ghc-devs at haskell.org
Sat Sep 9 13:18:24 UTC 2017


#14208: Performance with -O2 is worse than with -O0 which is worse than runghc
-------------------------------------+-------------------------------------
           Reporter:  harendra       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Runtime
  Unknown/Multiple                   |  performance bug
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In this particular case `-O2` is 2x slower than `-O0` and `-O0` is 2x
 slower than `runghc`. Please see the github repo: https://github.com
 /harendra-kumar/ghc-perf to reproduce the issue. Readme file in the repo
 has instructions to reproduce.

 The issue seems to occur when the code is placed in a different module.
 When all the code is in the same module the problem does not occur. In
 that case `-O2` is faster than `-O0`. However, when the code is split into
 two modules the performance gets inverted.

 Also, it does not occur always, when I tried to change the code to make it
 simpler for repro the problem did not occur.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14208>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list