#5549: ~100% performance regression in HEAD compared to ghc6.12, ~22% compared
to
7.0.4
--------------------------------------+-------------------------------------
Reporter: tomaszw | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 7.4.1
Component: Compiler | Version: 7.3
Resolution: fixed | Keywords: performance regression
Testcase: perf/should_run/T5549 | Blockedby:
Difficulty: | Os: Linux
Blocking: | Architecture: x86
Failure: Runtime performance bug |
--------------------------------------+-------------------------------------
Changes (by simonpj):
* status: new => closed
* testcase: => perf/should_run/T5549
* resolution: => fixed
Comment:
There really was a bug here: literal Integer constants were getting
inlined inside functions, resulting in greatly increased allocation. I
don't know how you got back to the same figures as 6.12.
I get this for HEAD before my fix
{{{
12,228,727,040 bytes allocated in the heap
5,875,944 bytes copied during GC
27,832 bytes maximum residency (1 sample(s))
21,752 bytes maximum slop
2 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max
pause
Gen 0 23381 colls, 0 par 0.16s 0.16s 0.0000s
0.0001s
Gen 1 1 colls, 0 par 0.00s 0.00s 0.0006s
0.0006s
INIT time 0.00s ( 0.00s elapsed)
MUT time 5.97s ( 5.97s elapsed)
GC time 0.16s ( 0.16s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 6.13s ( 6.13s elapsed)
%GC time 2.6% (2.6% elapsed)
Alloc rate 2,048,966,008 bytes per MUT second
Productivity 97.4% of total user, 97.4% of total elapsed
}}}
and this for 6.12
{{{
6,751,283,512 bytes allocated in the heap
7,051,256 bytes copied during GC
27,832 bytes maximum residency (1 sample(s))
242,160 bytes maximum slop
2 MB total memory in use (0 MB lost due to fragmentation)
Generation 0: 12877 collections, 0 parallel, 0.10s, 0.09s elapsed
Generation 1: 1 collections, 0 parallel, 0.00s, 0.00s elapsed
INIT time 0.01s ( 0.00s elapsed)
MUT time 4.57s ( 4.60s elapsed)
GC time 0.10s ( 0.09s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 4.68s ( 4.69s elapsed)
%GC time 2.1% (1.9% elapsed)
Alloc rate 1,474,079,369 bytes per MUT second
Productivity 97.6% of total user, 97.5% of total elapsed
}}}
--------------------------------
But I get this after my fix:
{{{
6,725,848,096 bytes allocated in the heap
4,559,016 bytes copied during GC
27,816 bytes maximum residency (1 sample(s))
19,544 bytes maximum slop
2 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max
pause
Gen 0 12876 colls, 0 par 0.11s 0.11s 0.0000s
0.0001s
Gen 1 1 colls, 0 par 0.00s 0.00s 0.0006s
0.0006s
INIT time 0.00s ( 0.00s elapsed)
MUT time 5.28s ( 5.29s elapsed)
GC time 0.11s ( 0.11s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 5.39s ( 5.39s elapsed)
%GC time 2.0% (2.0% elapsed)
Alloc rate 1,272,387,285 bytes per MUT second
Productivity 98.0% of total user, 98.0% of total elapsed
}}}
So we are happy.
These figures are not for your program, but another one where I added a
more extreme case: `testsuite/tests/perf/should_run/T5549`.
Thanks for reporting!
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5549#comment:5>
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