@@ -2,6 +2,28 @@ using ScoreDrivenModels, Distributions, BenchmarkTools, Random, Test
2
2
3
3
include (" test/utils.jl" )
4
4
5
+ scaling = 0.0
6
+ ω = [0.1 , 0.1 ]
7
+ A = [0.2 0 ; 0 0.2 ]
8
+ B = [0.2 0 ; 0 0.2 ]
9
+ simulation = simulate_GAS_1_1 (Beta, scaling, ω, A, B, 1 )
10
+ gas = GAS (1 , 1 , Beta, scaling)
11
+ gas. ω = ω
12
+ gas. A[1 ] = A
13
+ gas. B[1 ] = B
14
+ @benchmark score_driven_recursion ($ gas, $ simulation)
15
+ # BenchmarkTools.Trial:
16
+ # memory estimate: 235.38 KiB
17
+ # allocs estimate: 18
18
+ # --------------
19
+ # minimum time: 999.374 μs (0.00% GC)
20
+ # median time: 1.006 ms (0.00% GC)
21
+ # mean time: 1.050 ms (1.74% GC)
22
+ # maximum time: 55.351 ms (98.06% GC)
23
+ # --------------
24
+ # samples: 4756
25
+ # evals/sample: 1
26
+
5
27
scaling = 0.0
6
28
ω = [0.1 , 0.1 ]
7
29
A = [0.2 0 ; 0 0.2 ]
@@ -17,13 +39,13 @@ num_seeds = 3
17
39
fit! (gas, $ simulation; verbose = $ verbose, opt_method = opt_method)
18
40
end
19
41
# BenchmarkTools.Trial:
20
- # memory estimate: 466.69 MiB
21
- # allocs estimate: 40237
42
+ # memory estimate: 516.71 MiB
43
+ # allocs estimate: 50679
22
44
# --------------
23
- # minimum time: 2.553 s (0.57 % GC)
24
- # median time: 2.655 s (0.59 % GC)
25
- # mean time: 2.655 s (0.59 % GC)
26
- # maximum time: 2.756 s (0.60 % GC)
45
+ # minimum time: 2.857 s (2.91 % GC)
46
+ # median time: 2.927 s (1.71 % GC)
47
+ # mean time: 2.927 s (1.71 % GC)
48
+ # maximum time: 2.997 s (0.57 % GC)
27
49
# --------------
28
50
# samples: 2
29
51
# evals/sample: 1
@@ -43,13 +65,13 @@ num_seeds = 3
43
65
fit! (gas, $ simulation; verbose = $ verbose, opt_method = opt_method)
44
66
end
45
67
# BenchmarkTools.Trial:
46
- # memory estimate: 353.02 MiB
47
- # allocs estimate: 30598
68
+ # memory estimate: 386.33 MiB
69
+ # allocs estimate: 38084
48
70
# --------------
49
- # minimum time: 1.008 s (1.41 % GC)
50
- # median time: 1.265 s (1.36 % GC)
51
- # mean time: 1.281 s (1.35 % GC)
52
- # maximum time: 1.587 s (1.28 % GC)
71
+ # minimum time: 1.014 s (1.15 % GC)
72
+ # median time: 1.358 s (1.13 % GC)
73
+ # mean time: 1.341 s (2.56 % GC)
74
+ # maximum time: 1.632 s (1.12 % GC)
53
75
# --------------
54
76
# samples: 4
55
77
# evals/sample: 1
@@ -62,15 +84,15 @@ scaling = 0.5
62
84
fit! (gas, $ simulation; verbose = $ verbose, opt_method = opt_method)
63
85
end
64
86
# BenchmarkTools.Trial:
65
- # memory estimate: 8.26 GiB
66
- # allocs estimate: 159942290
87
+ # memory estimate: 1.94 GiB
88
+ # allocs estimate: 54273958
67
89
# --------------
68
- # minimum time: 7.361 s (18.19 % GC)
69
- # median time: 7.361 s (18.19 % GC)
70
- # mean time: 7.361 s (18.19 % GC)
71
- # maximum time: 7.361 s (18.19 % GC)
90
+ # minimum time: 4.936 s (3.77 % GC)
91
+ # median time: 6.007 s (4.06 % GC)
92
+ # mean time: 6.007 s (4.06 % GC)
93
+ # maximum time: 7.078 s (4.26 % GC)
72
94
# --------------
73
- # samples: 1
95
+ # samples: 2
74
96
# evals/sample: 1
75
97
76
98
scaling = 1.0
@@ -80,13 +102,13 @@ scaling = 1.0
80
102
fit! (gas, $ simulation; verbose = $ verbose, opt_method = opt_method)
81
103
end
82
104
# BenchmarkTools.Trial:
83
- # memory estimate: 666.69 MiB
84
- # allocs estimate: 8744603
105
+ # memory estimate: 750.17 MiB
106
+ # allocs estimate: 9849254
85
107
# --------------
86
- # minimum time: 2.908 s (2.08 % GC)
87
- # median time: 3.382 s (2.07 % GC)
88
- # mean time: 3.382 s (2.07 % GC)
89
- # maximum time: 3.855 s (2.07 % GC)
108
+ # minimum time: 3.217 s (1.91 % GC)
109
+ # median time: 3.320 s (1.91 % GC)
110
+ # mean time: 3.320 s (1.91 % GC)
111
+ # maximum time: 3.424 s (1.92 % GC)
90
112
# --------------
91
113
# samples: 2
92
114
# evals/sample: 1
0 commit comments