We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 897009f commit 17b12a0Copy full SHA for 17b12a0
test/benchmarks.jl
@@ -34,3 +34,23 @@ print("set indexing: ")
34
@btime setindexing($TA, $x, $y)
35
print("broadcast: ")
36
@btime broadcasting($TA)
37
+
38
+print("= Benchmarks on task and TArray copying")
39
+function f()
40
+ t = TArray(Int, 1)
41
+ t[1] = 0
42
+ while true
43
+ produce(t[1])
44
+ t[1]
45
+ t[1] = 1 + t[1]
46
+ end
47
+end
48
49
+@btime begin
50
+ ctask = CTask(f)
51
+ consume(ctask)
52
53
+ a = copy(ctask)
54
+ consume(a)
55
56
0 commit comments