[Git][ghc/ghc][wip/T24789_size_test] Unicode: General Category size test (related #24789)

Serge S. Gulin (@gulin.serge) gitlab at gitlab.haskell.org
Sat May 18 08:40:36 UTC 2024



Serge S. Gulin pushed to branch wip/T24789_size_test at Glasgow Haskell Compiler / GHC


Commits:
f958601b by Serge S. Gulin at 2024-05-18T11:35:00+03:00
Unicode: General Category size test (related #24789)

Added trivial size performance test which involves unicode general category usage via `read`.
The `read` itself uses general category to detect spaces.

The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789.

- - - - -


2 changed files:

- testsuite/tests/perf/size/all.T
- + testsuite/tests/perf/size/size_hello_unicode.hs


Changes:

=====================================
testsuite/tests/perf/size/all.T
=====================================
@@ -3,6 +3,8 @@ test('size_hello_obj', [collect_size(5, 'size_hello_obj.o')], compile, [''])
 test('size_hello_artifact', [collect_size(5, 'size_hello_artifact' + exe_extension())],
                              compile_artifact, [''])
 
+test('size_hello_unicode', [collect_size(5, 'size_hello_unicode' + exe_extension())], compile_artifact, [''])
+
 size_acceptance_threshold = 100
 
 test('array_dir'           ,[collect_size_ghc_pkg(size_acceptance_threshold , 'array')]           , static_stats , [] )


=====================================
testsuite/tests/perf/size/size_hello_unicode.hs
=====================================
@@ -0,0 +1,5 @@
+-- same as size_hello_artifact but we test the size of the resulting executable with unicode general category involved.
+module Main where
+
+-- read uses unicode general category to detect spaces
+main = print (read @Int "1337")



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f958601bdc39b1800122b6bcd0a1d42b60cf571e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f958601bdc39b1800122b6bcd0a1d42b60cf571e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240518/551fb59e/attachment.html>


More information about the ghc-commits mailing list