#5505: Program runs faster with profiling than without
---------------------------------+------------------------------------------
Reporter: simonpj | Owner: simonmar
Type: bug | Status: new
Priority: high | Milestone: 7.4.1
Component: Compiler | Version: 7.0.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by bgamari):
Here are -sstderr logs for both the profiling and non-profiling cases.
Note that in my case relatively little time is spent in GC,
'''With profiling'''
{{{
../../GGen/dist/build/GGen/GGen z_endstop_clamp_and_mount.stl +RTS
-sstderr
10,355,015,584 bytes allocated in the heap
196,136,736 bytes copied during GC
7,760,328 bytes maximum residency (27 sample(s))
479,656 bytes maximum slop
20 MB total memory in use (0 MB lost due to fragmentation)
Generation 0: 19768 collections, 0 parallel, 0.44s, 0.47s elapsed
Generation 1: 27 collections, 0 parallel, 0.15s, 0.16s elapsed
INIT time 0.01s ( 0.00s elapsed)
MUT time 13.56s ( 15.97s elapsed)
GC time 0.59s ( 0.64s elapsed)
RP time 0.00s ( 0.00s elapsed)
PROF time 0.00s ( 0.00s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 14.15s ( 16.60s elapsed)
%GC time 4.2% (3.8% elapsed)
Alloc rate 763,501,989 bytes per MUT second
Productivity 95.8% of total user, 81.6% of total elapsed
}}}
'''Without profiling'''
{{{
../../GGen/dist/build/GGen/GGen z_endstop_clamp_and_mount.stl +RTS
-sstderr
18,234,515,824 bytes allocated in the heap
128,446,200 bytes copied during GC
5,211,504 bytes maximum residency (23 sample(s))
325,792 bytes maximum slop
13 MB total memory in use (0 MB lost due to fragmentation)
Generation 0: 34960 collections, 0 parallel, 0.62s, 0.71s elapsed
Generation 1: 23 collections, 0 parallel, 0.10s, 0.10s elapsed
INIT time 0.01s ( 0.00s elapsed)
MUT time 27.14s ( 31.47s elapsed)
GC time 0.72s ( 0.81s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 27.86s ( 32.27s elapsed)
%GC time 2.6% (2.5% elapsed)
Alloc rate 671,650,697 bytes per MUT second
Productivity 97.4% of total user, 84.1% of total elapsed
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5505#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs