[GHC] #16004: Vector performance regression in GHC 8.6

GHC ghc-devs at haskell.org
Thu Dec 6 23:04:13 UTC 2018


#16004: Vector performance regression in GHC 8.6
-------------------------------------+-------------------------------------
        Reporter:  guibou            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.3
       Component:  Compiler          |              Version:  8.6.2
      Resolution:                    |             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:                    |
-------------------------------------+-------------------------------------

Comment (by guibou):

 Simon: Is the following example without `vector` interesting as a
 standalone test case:

 {{{#!haskell
 import Data.Foldable (for_)

 main :: IO ()
 main = do
   let n = 1000

   for_ [0 :: Int ..(n - 1)] $ \_k -> do
     for_ [0 :: Int ..(n - 1)] $ \_i -> do
       for_ [0 :: Int ..(n - 1)] $ \_j -> do
         pure ()
 }}}

 Timings:

 ghc 8.2.2: 0.667s
 ghc 8.4.4: 0.357s
 ghc 8.6.2: 1.007s

 Note that I have only included the results without using `-fllvm` because
 apparently the llvm backend is "smart" enough to understand that the loops
 can be removed and results in a runtime of 0.001s.

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


More information about the ghc-tickets mailing list