Skip to content

Commit

Permalink
benchmarks: filter on older package version
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Oct 6, 2024
1 parent 56ac843 commit 90fd2dd
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,27 @@ function create_utils_benchmark()
s
end

suite["randomly_rotate_tree_x10"] = @benchmarkable(
foreach(trees) do tree
randomly_rotate_tree!(tree, $options)
end,
setup = (
T = Float64;
nfeatures = 3;
trees = [
gen_random_tree_fixed_size(20, $options, nfeatures, T) for i in 1:($ntrees)
]
if isdefined(SymbolicRegression.MutationFunctionsModule, :randomly_rotate_tree!)
suite["randomly_rotate_tree_x10"] = @benchmarkable(
foreach(trees) do tree
SymbolicRegression.MutationFunctionsModule.randomly_rotate_tree!(tree)
end,
setup = (
T = Float64;
nfeatures = 3;
trees = [
gen_random_tree_fixed_size(20, $options, nfeatures, T) for
i in 1:($ntrees)
]
)
)
)
end

suite["insert_random_op_x10"] = @benchmarkable(
foreach(trees) do tree
insert_random_op(tree, $options, nfeatures)
SymbolicRegression.MutationFunctionsModule.insert_random_op(
tree, $options, nfeatures
)
end,
setup = (
T = Float64;
Expand Down

0 comments on commit 90fd2dd

Please sign in to comment.