[GHC] #9646: Strange performance bug

GHC ghc-devs at haskell.org
Tue Sep 30 10:44:04 UTC 2014


#9646: Strange performance bug
-------------------------------------+-------------------------------------
              Reporter:  erikd       |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:  Linux       |     Architecture:  x86_64 (amd64)
       Type of failure:  Runtime     |       Difficulty:  Unknown
  performance bug                    |       Blocked By:
             Test Case:              |  Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by erikd):

 I added a a number of -ddump-* flags and reduced the
 `New3/GHC/InteterNatural.hs` file to contain nothing but the `timeNatural`
 function that we're interested in.

 What I found was:

 * Desugar stage output (file Natural.dump-ds) output is identical.
 * Simplifier stage ( (file Natural.dump-simpl) is different.

 I've added the fast and slow versions of the .dump-simpl outputs.

 The slow version of the code seems to have a lot more let bindings that
 the fast version. The fast version is more like to use case expressions.

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


More information about the ghc-tickets mailing list