[GHC] #11285: Static linking is really slow sometimes
GHC
ghc-devs at haskell.org
Thu Dec 24 19:06:25 UTC 2015
#11285: Static linking is really slow sometimes
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I'm testing on Cabal `Setup.hs`, which links against Cabal.
On a beefy machine with many cores and lots of RAM, I see a x2 regression
in linking time from GHC 7.10.2 to GHC 8.0 (a recent HEAD) using GNU ld
(not gold):
{{{
[ezyang at hs01 ezyang]$ rm A; time ghc --make A.hs -fforce-recomp
[1 of 1] Compiling Main ( A.hs, A.o )
Linking A ...
real 0m1.273s
user 0m0.990s
sys 0m0.210s
[ezyang at hs01 ezyang]$ rm A; time ghc-8.0/usr/bin/ghc --make A.hs -fforce-
recomp
[1 of 1] Compiling Main ( A.hs, A.o )
Linking A ...
real 0m3.270s
user 0m2.727s
sys 0m0.523s
}}}
On a puny eight year-old laptop, I see a x2 regression from 7.6 to 7.10
(with not much change with 8.0)
{{{
ezyang at sabre:~$ rm A; time ghc --make -O0 A.hs -fforce-recomp
rm: cannot remove ‘A’: No such file or directory
[1 of 1] Compiling Main ( A.hs, A.o )
Linking A ...
real 0m3.058s
user 0m1.860s
sys 0m1.164s
ezyang at sabre:~$ rm A; time ghc-7.10 --make -O0 A.hs -fforce-recomp
[1 of 1] Compiling Main ( A.hs, A.o )
Linking A ...
real 0m7.139s
user 0m4.616s
sys 0m2.488s
}}}
There must be something which is causing the linker to run slowly in one
case, and quickly in the other. It would be really good to figure out what
this is. Slow linking is NOT NICE.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11285>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list