diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-03-22 15:42:47 -0400 |
---|---|---|
committer | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2022-04-28 09:10:31 +0000 |
commit | f6a8185d741adec8b0cc89749bc660128eca57fe (patch) | |
tree | 67004367e333ee3a253dd9edd9afb3f61f628675 | |
parent | 81cf52bb301592ff3d043d03eb9a0d547891a3e1 (diff) | |
download | haskell-f6a8185d741adec8b0cc89749bc660128eca57fe.tar.gz |
testsuite: Add performance test for #14766wip/T14766-test
This distills the essence of the Sigs.hs program found in the ticket.
-rw-r--r-- | testsuite/tests/perf/compiler/all.T | 7 | ||||
-rwxr-xr-x | testsuite/tests/perf/compiler/genT14766.py | 24 |
2 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index 17bb717ee9..3d0796564e 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -585,6 +585,13 @@ test ('T13253-spj', ], compile, ['-v0 -O']) +test ('T14766', + [ collect_compiler_stats('bytes allocated',2), + pre_cmd('python3 genT14766.py > T14766.hs'), + extra_files(['genT14766.py']), + ], + compile, + ['-v0']) test ('T18223', [ collect_compiler_stats('bytes allocated',2) , compile_timeout_multiplier(2) diff --git a/testsuite/tests/perf/compiler/genT14766.py b/testsuite/tests/perf/compiler/genT14766.py new file mode 100755 index 0000000000..fed2665598 --- /dev/null +++ b/testsuite/tests/perf/compiler/genT14766.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +N_VARS = 100 +N_BINDS = 50 + +tyvars = ' '.join('v{i}'.format(i=i) for i in range(N_VARS)) + +print(''' +{{-# LANGUAGE PartialTypeSignatures #-}} +{{-# OPTIONS_GHC -Wno-partial-type-signatures #-}} + +module T14766 where + +newtype T {tyvars} = T () + +'''.format(tyvars=tyvars)) + +holes = ' '.join('_' for i in range(N_VARS)) +for i in range(N_BINDS): + print('v{i} :: T {holes}'.format(i=i, holes=holes)) + print('v{i} = T ()'.format(i=i)) + + |