[GHC] #14614: Compile time regression when compiling alex generated files

GHC ghc-devs at haskell.org
Mon Dec 25 12:03:26 UTC 2017


#14614: Compile time regression when compiling alex generated files
-------------------------------------+-------------------------------------
        Reporter:  AndreasK          |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11380            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by AndreasK):

 * status:  new => closed
 * resolution:   => invalid


Old description:

> Compile time increased slightly from 7.10.3 to 8.0.2 and significantly
> when going to 8.2.2
>
> {{{
> compiler=ghc-7.10.3
>
> /c/test/happy-example
> $ time ghc Tokens.hs -fforce-recomp -fno-code
> [1 of 1] Compiling Tokens           ( Tokens.hs, nothing )
>
> real    0m0.243s
>

>

> compiler=ghc-8.0.2
>
> /c/test/happy-example
> $ time ghc Tokens.hs -fforce-recomp -fno-code
> [1 of 1] Compiling Tokens           ( Tokens.hs, nothing )
>
> real    0m0.286s
>

>

> compiler=ghc-8.2.2
>
> $ time ghc Tokens.hs -fforce-recomp -fno-code
> [1 of 1] Compiling Tokens           ( Tokens.hs, nothing )
>
> real    0m0.721s
> }}}

New description:

 This seems to be caused by the difference in package dbs resulting in a
 constant time difference.

--

Comment:

 This takes 0.8 seconds to just typecheck and desugar on GHC-8.2.2:

 {{{
 module Tokens where
 import GHC.Exts

 data AlexAddr = AlexA# Addr#
 }}}

 8.0.2:
 {{{
 $ time ghc T.hs -fforce-recomp -fno-code
 [1 of 1] Compiling Tokens           ( T.hs, nothing )

 real    0m0.354s
 user    0m0.000s
 sys     0m0.000s
 }}}

 8.2.2:
 {{{

 time ghc T.hs -fforce-recomp -fno-code
 [1 of 1] Compiling Tokens           ( T.hs, nothing )

 real    0m0.866s
 user    0m0.015s
 sys     0m0.000s
 }}}

 T

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


More information about the ghc-tickets mailing list