[GHC] #14414: Profiled program runs 2.5x faster than non-profiled

GHC ghc-devs at haskell.org
Thu Nov 2 22:50:27 UTC 2017


#14414: Profiled program runs 2.5x faster than non-profiled
-------------------------------------+-------------------------------------
        Reporter:  Fuuzetsu          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Fuuzetsu):

 I don't know what you could be missing. I removed LLVM. I'm on i7 6770k,
 64GB RAM, SSD.

 {{{
 [shana at lenalee:/tmp]$ ghc --make -ddump-simpl -ddump-to-file -fforce-
 recomp -O2 -XBangPatterns -threaded -rtsopts -XOverloadedStrings
 fasta.ghc-2.hs -o fasta.ghc-2.ghc_run && ./fasta.ghc-2.ghc_run +RTS -N4 -s
 -RTS 250000 > /dev/null
 [1 of 1] Compiling Main             ( fasta.ghc-2.hs, fasta.ghc-2.o )
 Linking fasta.ghc-2.ghc_run ...
      368,568,064 bytes allocated in the heap
       15,735,800 bytes copied during GC
        3,692,976 bytes maximum residency (7 sample(s))
          226,896 bytes maximum slop
                9 MB total memory in use (0 MB lost due to fragmentation)

                                      Tot time (elapsed)  Avg pause  Max
 pause
   Gen  0       137 colls,   137 par    1.660s   1.660s     0.0121s
 0.0280s
   Gen  1         7 colls,     6 par    0.127s   0.127s     0.0182s
 0.0274s

   Parallel GC work balance: 35.73% (serial 0%, perfect 100%)

   TASKS: 10 (1 bound, 9 peak workers (9 total), using -N4)

   SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

   INIT    time    0.000s  (  0.000s elapsed)
   MUT     time    0.206s  (  0.206s elapsed)
   GC      time    1.787s  (  1.787s elapsed)
   EXIT    time    0.000s  (  0.007s elapsed)
   Total   time    1.993s  (  2.000s elapsed)

   Alloc rate    1,789,756,100 bytes per MUT second

   Productivity  10.3% of total user, 10.7% of total elapsed

 gc_alloc_block_sync: 0
 whitehole_spin: 0
 gen[0].sync: 0
 gen[1].sync: 0

 [shana at lenalee:/tmp]$ ghc --make -ddump-simpl -ddump-to-file -prof -fprof-
 auto -fforce-recomp -O2 -XBangPatterns -threaded -rtsopts
 -XOverloadedStrings fasta.ghc-2.hs -o fasta.ghc-2.ghc_run &&
 ./fasta.ghc-2.ghc_run +RTS -N4 -s -p -RTS 250000 > /dev/null
 [1 of 1] Compiling Main             ( fasta.ghc-2.hs, fasta.ghc-2.o )
 Linking fasta.ghc-2.ghc_run ...
      653,685,432 bytes allocated in the heap
       42,865,544 bytes copied during GC
        4,548,264 bytes maximum residency (9 sample(s))
          584,024 bytes maximum slop
               10 MB total memory in use (0 MB lost due to fragmentation)

                                      Tot time (elapsed)  Avg pause  Max
 pause
   Gen  0       256 colls,   256 par    0.371s   0.371s     0.0014s
 0.0073s
   Gen  1         9 colls,     8 par    0.015s   0.015s     0.0017s
 0.0063s

   Parallel GC work balance: 16.49% (serial 0%, perfect 100%)

   TASKS: 10 (1 bound, 9 peak workers (9 total), using -N4)

   SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

   INIT    time    0.000s  (  0.000s elapsed)
   MUT     time    0.487s  (  0.487s elapsed)
   GC      time    0.386s  (  0.386s elapsed)
   RP      time    0.000s  (  0.000s elapsed)
   PROF    time    0.000s  (  0.000s elapsed)
   EXIT    time    0.000s  (  0.001s elapsed)
   Total   time    0.874s  (  0.874s elapsed)

   Alloc rate    1,340,938,477 bytes per MUT second

   Productivity  55.8% of total user, 55.8% of total elapsed

 gc_alloc_block_sync: 0
 whitehole_spin: 0
 gen[0].sync: 0
 gen[1].sync: 0
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14414#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list