diff options
author | Viktor Dukhovni <ietf-dane@dukhovni.org> | 2021-03-16 12:43:54 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-20 07:54:01 -0400 |
commit | e84e280503e35bd33ae6c5a7f7f4f922dd205dbe (patch) | |
tree | 2b22ddcf84477f0a98726aae2f81d6cec07a2fdc | |
parent | 226cefd0a8ae0212e8748ee427e617abd725c649 (diff) | |
download | haskell-e84e280503e35bd33ae6c5a7f7f4f922dd205dbe.tar.gz |
Add fold vs. mconcat test T17123
-rw-r--r-- | testsuite/tests/perf/should_run/T17123.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/perf/should_run/all.T | 5 |
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), |