File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 11using DynamicExpressions, BenchmarkTools, Random
22using DynamicExpressions. EquationUtilsModule: is_constant
3+ using DynamicExpressions. UtilsModule: is_bad_array
34
45include (" benchmark_utils.jl" )
56
115116f_tree_op (f:: F , tree, operators) where {F} = f (tree, operators)
116117f_tree_op (f:: F , tree) where {F} = f (tree)
117118
118- function benchmark_utilities ()
119+ function tree_utilities ()
119120 suite = BenchmarkGroup ()
120121
121122 all_funcs = (
@@ -171,6 +172,20 @@ function benchmark_utilities()
171172 s
172173 end
173174 end
175+ return suite
176+ end
177+
178+ function benchmark_utilities ()
179+ suite = BenchmarkGroup ()
180+
181+ suite[" trees" ] = tree_utilities ()
182+ suite[" extra" ] = let s = BenchmarkGroup ()
183+ f (Xs) = [is_bad_array (X) for X in Xs]
184+ s[" is_bad_array" ] = @benchmarkable (
185+ f (Xs), setup = (Xs = ntuple (n -> randn (Float64, 10_000 + n), 16 ))
186+ )
187+ s
188+ end
174189
175190 return suite
176191end
You can’t perform that action at this time.
0 commit comments