Skip to content

Commit e5494ea

Browse files
committed
Clean up benchmarking output
1 parent 3e06ee3 commit e5494ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

benchmark/benchmarks.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ function benchmark_utilities()
102102
)
103103

104104
operators = OperatorEnum(; binary_operators=[+, -, /, *], unary_operators=[cos, exp])
105-
106105
for func_k in all_funcs
107106
suite[func_k] = let s = BenchmarkGroup()
108107
for k in (:break_sharing, :preserve_sharing)
109-
k == :preserve_sharing && !(func_k in (:copy, :convert)) && continue
108+
has_both_modes = func_k in (:copy, :convert)
109+
k == :preserve_sharing && !has_both_modes && continue
110110

111111
f = if func_k == :copy
112112
tree -> _copy_node(tree; preserve_sharing=(k == :preserve_sharing))
@@ -134,6 +134,9 @@ function benchmark_utilities()
134134
trees=[gen_random_tree_fixed_size(n, $operators, 5, Float32) for _ in 1:ntrees]
135135
)
136136
)
137+
if !has_both_modes
138+
s = s[k]
139+
end
137140
#! format: on
138141
end
139142
s

0 commit comments

Comments
 (0)