Skip to content

Commit 01a0b34

Browse files
committed
Test produce global performance
1 parent b2e65b8 commit 01a0b34

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/test_utils.jl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ function test_cases()
139139
[Ptr{UInt8}, Ptr{UInt8}],
140140
allocs,
141141
),
142-
Testcase("dynamic scope 1", 5, (taped_globals_tester_1,), nothing, [5], allocs),
143-
Testcase("dynamic scope 2", 6, (taped_globals_tester_1,), nothing, [6], none),
142+
Testcase("globals tester 1", 5, (taped_globals_tester_1,), nothing, [5], allocs),
143+
Testcase("globals tester 2", 6, (taped_globals_tester_1,), nothing, [6], none),
144+
Testcase(
145+
"globals tester 3", 6, (while_loop_with_globals,), nothing, fill(6, 9), allocs
146+
),
144147
Testcase(
145148
"nested (static)", nothing, (static_nested_outer,), nothing, [true, false], none
146149
),
@@ -291,6 +294,15 @@ function taped_globals_tester_1()
291294
return nothing
292295
end
293296

297+
function while_loop_with_globals()
298+
t = 1
299+
while t < 10
300+
produce(get_taped_globals(Int))
301+
t = 1 + t
302+
end
303+
return nothing
304+
end
305+
294306
@noinline function nested_inner()
295307
produce(true)
296308
return 1

0 commit comments

Comments
 (0)