Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
d793a148
Commit
d793a148
authored
Mar 11, 2014
by
tibbe
Browse files
Add perf test for inline array allocation
parent
d8b38265
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/perf/should_run/InlineArrayAlloc.hs
0 → 100644
View file @
d793a148
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-}
module
Main
where
import
GHC.Exts
import
GHC.IO
main
::
IO
()
main
=
loop
10000000
where
loop
::
Int
->
IO
()
loop
0
=
return
()
loop
i
=
newArray
>>
loop
(
i
-
1
)
newArray
::
IO
()
newArray
=
IO
$
\
s
->
case
newArray
#
16
#
()
s
of
(
#
s'
,
_
#
)
->
(
#
s'
,
()
#
)
testsuite/tests/perf/should_run/all.T
View file @
d793a148
...
...
@@ -331,3 +331,9 @@ test('T7619',
compile_and_run
,
['
-O
'])
test
('
InlineArrayAlloc
',
[
stats_num_field
('
bytes allocated
',
[
(
wordsize
(
64
),
1600040960
,
5
)]),
only_ways
(['
normal
'])],
compile_and_run
,
['
-O2
'])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment