[GHC] #9646: Strange performance bug

GHC ghc-devs at haskell.org
Mon Sep 29 12:28:58 UTC 2014


#9646: Strange performance bug
-------------------------------------+-------------------------------------
       Reporter:  erikd              |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler           |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:  Runtime
     Blocked By:                     |  performance bug
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 I've been chasing a weird performance bug for about a week now. I've
 reduced the testcase to the following git repo:

     https://github.com/erikd/ghc-perfbug-test

 The Readme.md file in that repo contains an explanation of how to
 reproduce the issue.

 The benchmark program in the repo uses Criterion to test the performance
 of one particular function. Running the program in a particular way
 results into two significanlty different results.

 The commands are:

 {{{
 make clean bench-integer.html
 cp -f bench-integer.html bench-integer-slow.html
 touch New3/GHC/Integer/Natural.hs && make bench-integer.html
 }}}

 The results for one function in the file `New3/GHC/Integer/Natural.hs` is
 8 times slower in the first test that the second while the other test
 function always executes at about the speed.

 I haven't been able to test this with ghc-7.6.3 because the code uses
 `isTrue#` which isn't available in 7.6.3.

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


More information about the ghc-tickets mailing list