summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2021-03-16 12:43:54 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-20 07:54:01 -0400
commite84e280503e35bd33ae6c5a7f7f4f922dd205dbe (patch)
tree2b22ddcf84477f0a98726aae2f81d6cec07a2fdc
parent226cefd0a8ae0212e8748ee427e617abd725c649 (diff)
downloadhaskell-e84e280503e35bd33ae6c5a7f7f4f922dd205dbe.tar.gz
Add fold vs. mconcat test T17123
-rw-r--r--testsuite/tests/perf/should_run/T17123.hs9
-rw-r--r--testsuite/tests/perf/should_run/all.T5
2 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/perf/should_run/T17123.hs b/testsuite/tests/perf/should_run/T17123.hs
new file mode 100644
index 0000000000..40050171b1
--- /dev/null
+++ b/testsuite/tests/perf/should_run/T17123.hs
@@ -0,0 +1,9 @@
+import qualified Data.Text as T
+import Data.Foldable
+
+xs :: [T.Text]
+xs = [ T.pack $ show n | n <- [0..10000] ]
+
+main :: IO ()
+main = do
+ fold xs `seq` return ()
diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T
index 0cb7c7a73a..d7257472e2 100644
--- a/testsuite/tests/perf/should_run/all.T
+++ b/testsuite/tests/perf/should_run/all.T
@@ -372,6 +372,11 @@ test('T15185',
compile_and_run,
['-O'])
+test('T17123',
+ [collect_stats('bytes allocated', 20), only_ways(['normal'])],
+ compile_and_run,
+ ['-O'])
+
# Test performance of creating Uniques.
test('UniqLoop',
[collect_stats('bytes allocated',5),