[GHC] #9961: compile-time performance regression compiling genprimcode
GHC
ghc-devs at haskell.org
Mon Jan 5 22:58:51 UTC 2015
#9961: compile-time performance regression compiling genprimcode
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.10.1-rc1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Compile-time
Unknown/Multiple | performance bug
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
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
```
...and here the GC/MUT ratio is even more off.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9961>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list