Re: [Haskell-cafe] Compile times and separate compilation

I presume you are using the -j switch.
Does it really help? I recently found that for travis builds, it is used by default (first surprise) but it's faster when it's turned off (second surprise). https://ghc.haskell.org/trac/ghc/ticket/10818#comment:15 - J.

On 22.02.2016 22:27, Johannes Waldmann wrote:
I presume you are using the -j switch. Does it really help? I recently found that for travis builds, it is used by default (first surprise) but it's faster when it's turned off (second surprise).
I meant ghc -j, not cabal -j. It does work very well. I did the following test. wojtek@Desktop2016:~/src/tpdb-1.2.0/src$ time ghc -j -fforce-recomp TPDB/*.hs TPDB/XTC/*.hs TPDB/DP/*.hs TPDB/CPF/Proof/*.hs TPDB/Data/*.hs TPDB/Plain/*.hs TPDB/Xml/*.hs [24 of 24] Compiling TPDB.Mirror ( TPDB/Mirror.hs, TPDB/Mirror.o ) real 0m1.221s user 0m2.416s sys 0m0.604s wojtek@Desktop2016:~/src/tpdb-1.2.0/src$ time ghc -fforce-recomp TPDB/*.hs TPDB/XTC/*.hs TPDB/DP/*.hs TPDB/CPF/Proof/*.hs TPDB/Data/*.hs TPDB/Plain/*.hs TPDB/Xml/*.hs [24 of 24] Compiling TPDB.Mirror ( TPDB/Mirror.hs, TPDB/Mirror.o ) real 0m1.791s user 0m1.660s sys 0m0.060s wojtek@Desktop2016:~/src/tpdb-1.2.0$ time cabal build -j [24 of 24] Compiling TPDB.CPF.Proof.Util ( src/TPDB/CPF/Proof/Util.hs, dist/build/TPDB/CPF/Proof/Util.o ) real 0m5.544s user 0m10.912s sys 0m2.628s Something is indeed wrong, either cabal is misusing ghc, or you are misusing cabal. This package is not a good test case for parallel build, it is too small. -- Wojtek

I think there's a problem with the number of cores that they report: the
vms/containers report 16 cores, while they only have 2. Perhaps -j2 would
work better?
Wojtek Narczyński
On 22.02.2016 22:27, Johannes Waldmann wrote:
I presume you are using the -j switch. Does it really help? I recently found that for travis builds, it is used by default (first surprise) but it's faster when it's turned off (second surprise).
I meant ghc -j, not cabal -j. It does work very well.
I did the following test.
wojtek@Desktop2016:~/src/tpdb-1.2.0/src$ time ghc -j -fforce-recomp TPDB/*.hs TPDB/XTC/*.hs TPDB/DP/*.hs TPDB/CPF/Proof/*.hs TPDB/Data/*.hs TPDB/Plain/*.hs TPDB/Xml/*.hs [24 of 24] Compiling TPDB.Mirror ( TPDB/Mirror.hs, TPDB/Mirror.o ) real 0m1.221s user 0m2.416s sys 0m0.604s
wojtek@Desktop2016:~/src/tpdb-1.2.0/src$ time ghc -fforce-recomp TPDB/*.hs TPDB/XTC/*.hs TPDB/DP/*.hs TPDB/CPF/Proof/*.hs TPDB/Data/*.hs TPDB/Plain/*.hs TPDB/Xml/*.hs [24 of 24] Compiling TPDB.Mirror ( TPDB/Mirror.hs, TPDB/Mirror.o ) real 0m1.791s user 0m1.660s sys 0m0.060s
wojtek@Desktop2016:~/src/tpdb-1.2.0$ time cabal build -j [24 of 24] Compiling TPDB.CPF.Proof.Util ( src/TPDB/CPF/Proof/Util.hs, dist/build/TPDB/CPF/Proof/Util.o ) real 0m5.544s user 0m10.912s sys 0m2.628s
Something is indeed wrong, either cabal is misusing ghc, or you are misusing cabal.
This package is not a good test case for parallel build, it is too small.
-- Wojtek _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

On 28.02.2016 21:25, Benno Fünfstück wrote:
I think there's a problem with the number of cores that they report: the vms/containers report 16 cores, while they only have 2. Perhaps -j2 would work better?
Yes :-) cabal build -j1 ....... 7.989s cabal build -j4 ....... 4.736s (I have 4 cores) cabal build -j16 ... 40.510s Today I realized I forgot -O2 yesterday, which cabal uses, I guess. Now cabal does not look that bad. ghc -O2 -j .......... 3.835s ghc -O2 ............. 6.462s -- Wojtek
participants (4)
-
Benno Fünfstück
-
Johannes Waldmann
-
Mikhail Glushenkov
-
Wojtek Narczyński