[GHC] #9233: Compiler performance regression
GHC
ghc-devs at haskell.org
Tue Jun 24 14:52:14 UTC 2014
#9233: Compiler performance regression
---------------------------------+------------------------------------
Reporter: augustss | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Windows | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
---------------------------------+------------------------------------
Comment (by goldfire):
I, too, have noticed that GHC has gotten slower to compile between 7.6.3
and 7.8.2. And, I have a nice file that demonstrates the slowness.
First, 7.6.3:
{{{
rae:10:40:52 ~/temp/th-desugar> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
rae:10:43:47 ~/temp/th-desugar> time ghc
Language/Haskell/TH/Desugar/Core.hs
[1 of 2] Compiling Language.Haskell.TH.Desugar.Util (
Language/Haskell/TH/Desugar/Util.hs, Language/Haskell/TH/Desugar/Util.o )
[2 of 2] Compiling Language.Haskell.TH.Desugar.Core (
Language/Haskell/TH/Desugar/Core.hs, Language/Haskell/TH/Desugar/Core.o )
real 0m2.674s
user 0m2.512s
sys 0m0.131s
rae:10:43:53 ~/temp/th-desugar> rm -f `find . -name '*.o' -or -name '*.hi'
-or -name '*.dyn*'`
rae:10:43:58 ~/temp/th-desugar> time ghc
Language/Haskell/TH/Desugar/Core.hs -O2
[1 of 2] Compiling Language.Haskell.TH.Desugar.Util (
Language/Haskell/TH/Desugar/Util.hs, Language/Haskell/TH/Desugar/Util.o )
[2 of 2] Compiling Language.Haskell.TH.Desugar.Core (
Language/Haskell/TH/Desugar/Core.hs, Language/Haskell/TH/Desugar/Core.o )
real 0m9.089s
user 0m8.648s
sys 0m0.241s
rae:10:44:13 ~/temp/th-desugar> rm -f `find . -name '*.o' -or -name '*.hi'
-or -name '*.dyn*'`
rae:10:44:17 ~/temp/th-desugar> time ghc
Language/Haskell/TH/Desugar/Core.hs -O2 -fno-spec-constr
[1 of 2] Compiling Language.Haskell.TH.Desugar.Util (
Language/Haskell/TH/Desugar/Util.hs, Language/Haskell/TH/Desugar/Util.o )
[2 of 2] Compiling Language.Haskell.TH.Desugar.Core (
Language/Haskell/TH/Desugar/Core.hs, Language/Haskell/TH/Desugar/Core.o )
real 0m9.351s
user 0m8.180s
sys 0m0.242s
}}}
Now, 7.8.2:
{{{
rae:10:44:41 ~/temp/th-desugar> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.2
rae:10:44:45 ~/temp/th-desugar> rm -f `find . -name '*.o' -or -name '*.hi'
-or -name '*.dyn*'`
rae:10:44:49 ~/temp/th-desugar> time ghc
Language/Haskell/TH/Desugar/Core.hs
[1 of 2] Compiling Language.Haskell.TH.Desugar.Util (
Language/Haskell/TH/Desugar/Util.hs, Language/Haskell/TH/Desugar/Util.o )
[2 of 2] Compiling Language.Haskell.TH.Desugar.Core (
Language/Haskell/TH/Desugar/Core.hs, Language/Haskell/TH/Desugar/Core.o )
real 1m5.906s
user 0m7.972s
sys 0m0.449s
rae:10:45:58 ~/temp/th-desugar> rm -f `find . -name '*.o' -or -name '*.hi'
-or -name '*.dyn*'`
rae:10:46:05 ~/temp/th-desugar> time ghc
Language/Haskell/TH/Desugar/Core.hs -O2
[1 of 2] Compiling Language.Haskell.TH.Desugar.Util (
Language/Haskell/TH/Desugar/Util.hs, Language/Haskell/TH/Desugar/Util.o )
[2 of 2] Compiling Language.Haskell.TH.Desugar.Core (
Language/Haskell/TH/Desugar/Core.hs, Language/Haskell/TH/Desugar/Core.o )
real 0m58.498s
user 0m18.374s
sys 0m0.566s
rae:10:47:06 ~/temp/th-desugar> rm -f `find . -name '*.o' -or -name '*.hi'
-or -name '*.dyn*'`
rae:10:47:14 ~/temp/th-desugar> time ghc
Language/Haskell/TH/Desugar/Core.hs -O2 -fno-spec-constr
[1 of 2] Compiling Language.Haskell.TH.Desugar.Util (
Language/Haskell/TH/Desugar/Util.hs, Language/Haskell/TH/Desugar/Util.o )
[2 of 2] Compiling Language.Haskell.TH.Desugar.Core (
Language/Haskell/TH/Desugar/Core.hs, Language/Haskell/TH/Desugar/Core.o )
real 1m32.710s
user 0m17.552s
sys 0m0.637s
}}}
The relevant files are attached. I don't have data for it, but I've
noticed that compiling these files in GHCi is relatively snappy.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9233#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list