summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/compiler/all.T
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2018-01-21 12:11:28 -0500
committerBen Gamari <ben@smart-cactus.org>2018-01-21 12:11:30 -0500
commit88297438d550a93f72261447a215b6a58b4fae55 (patch)
tree71dae15944d31a5e303e8cbb961f7820a41df755 /testsuite/tests/perf/compiler/all.T
parent4a13c5b1f4beb53cbf1f3529acdf3ba37528e694 (diff)
downloadhaskell-88297438d550a93f72261447a215b6a58b4fae55.tar.gz
Use IntSet in Dataflow
Before this change, a list was used as a substitute for a heap. This led to quadratic behavior on a simple program (see new test case). This change replaces it with IntSet in effect reverting 5a1a2633553. @simonmar said it's fine to revert as long as nofib results are good. Test Plan: new test case: 20% improvement 3x improvement when N=10000 nofib: I run it twice for before and after because the compile time results are noisy. - Compile Allocations: ``` before before re-run after after re-run -1 s.d. ----- -0.0% -0.1% -0.1% +1 s.d. ----- +0.0% +0.1% +0.1% Average ----- +0.0% -0.0% -0.0% ``` - Compile Time: ``` before before re-run after after re-run -1 s.d. ----- -0.1% -2.3% -2.6% +1 s.d. ----- +5.2% +3.7% +4.4% Average ----- +2.5% +0.7% +0.8% ``` I checked each case and couldn't find consistent slow-down/speed-up on compile time. Full results here: P173 Reviewers: simonpj, simonmar, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter, simonmar GHC Trac Issues: #14667 Differential Revision: https://phabricator.haskell.org/D4329
Diffstat (limited to 'testsuite/tests/perf/compiler/all.T')
-rw-r--r--testsuite/tests/perf/compiler/all.T12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index bd038a2407..51dc6e8a99 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -1166,6 +1166,18 @@ test('ManyConstructors',
multimod_compile,
['ManyConstructors', '-v0'])
+test('ManyAlternatives',
+ [ compiler_stats_num_field('bytes allocated',
+ [(wordsize(64), 1398898072, 10),
+ # initial: 1756999240
+ # 2018-01-20: 1398898072 Use IntSet in Dataflow
+ ]),
+ pre_cmd('./genManyAlternatives'),
+ extra_files(['genManyAlternatives']),
+ ],
+ multimod_compile,
+ ['ManyAlternatives', '-v0'])
+
test('T13701',
[ compiler_stats_num_field('bytes allocated',
[(platform('x86_64-apple-darwin'), 2217187888, 10),