Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,398
    • Issues 5,398
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 590
    • Merge requests 590
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9961
Closed
Open
Issue created Jan 05, 2015 by Herbert Valerio Riedel@hvr🕺Maintainer

compile-time performance regression compiling genprimcode

compiling utils/genprimopcode (where compiling the Alex-generated Lexer takes up the most amount of time) with GHC 7.8.4:

$ time /opt/ghc/7.8.4/bin/ghc  -Rghc-timing --make -O Main.hs 
[1 of 5] Compiling ParserM          ( ParserM.hs, ParserM.o )
[2 of 5] Compiling Lexer            ( Lexer.hs, Lexer.o )
[3 of 5] Compiling Syntax           ( Syntax.hs, Syntax.o )
[4 of 5] Compiling Parser           ( Parser.hs, Parser.o )
[5 of 5] Compiling Main             ( Main.hs, Main.o )
Linking Main ...
<<ghc: 20742311240 bytes, 2092 GCs, 60174814/140258264 avg/max bytes residency (33 samples), 332M in use, 0.00 INIT (0.00 elapsed), 7.84 MUT (8.35 elapsed), 6.93 GC (6.93 elapsed) :ghc>>

real	0m15.331s
user	0m15.173s
sys	0m0.172s

(btw, is it ok that GC takes up so much?)

the same with a GHC 7.10 snapshot takes *alot* longer:

$ time /opt/ghc/7.10.1/bin/ghc  -Rghc-timing --make -O Main.hs 
[1 of 5] Compiling ParserM          ( ParserM.hs, ParserM.o )
[2 of 5] Compiling Lexer            ( Lexer.hs, Lexer.o )
[3 of 5] Compiling Syntax           ( Syntax.hs, Syntax.o )
[4 of 5] Compiling Parser           ( Parser.hs, Parser.o )
[5 of 5] Compiling Main             ( Main.hs, Main.o )
Linking Main ...
<<ghc: 147681534568 bytes, 37824 GCs, 203338614/375314176 avg/max bytes residency (538 samples), 876M in use, 0.001 INIT (0.001 elapsed), 81.374 MUT (81.888 elapsed), 235.240 GC (235.136 elapsed) :ghc>>

real	5m17.061s
user	5m16.702s
sys	0m0.499s
  1. ..and here the GC/MUT ratio is even more off.
Edited Mar 10, 2019 by Herbert Valerio Riedel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking