Skip to content

Commit

Permalink
Slim down benchmark suite (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill authored Jun 18, 2024
1 parent c0f1dca commit 64d90f3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
28 changes: 16 additions & 12 deletions benchmark/hessian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ end

function hessbench_arrowhead(method)
suite = BenchmarkGroup()
# Commented-out cases (N, K) are included in the JuMP paper linked above,
# but excluded from to accelerate the benchmark suite.
for (N, K) in [
# Table 1
## Table 1
(200, 16),
(400, 16),
(800, 16),
# Table 2
# (400, 16),
# (800, 16),
## Table 2
(3200, 2),
(3200, 4),
(3200, 8),
# (3200, 4),
# (3200, 8),
]
x = rand(N)
f = ArrowHead(K)
Expand Down Expand Up @@ -72,15 +74,17 @@ end

function hessbench_randomsparsity(method)
suite = BenchmarkGroup()
# Commented-out cases (N, K) are included in the JuMP paper linked above,
# but excluded from to accelerate the benchmark suite.
for (N, K) in [
# Table 3
## Table 3
(400, 2),
(400, 4),
(400, 8),
# Table 4
# (400, 4),
# (400, 8),
## Table 4
(100, 32),
(200, 32),
(400, 32),
# (200, 32),
# (400, 32),
]
x = rand(N)
f = RandomSparsity(N, K)
Expand Down
4 changes: 2 additions & 2 deletions benchmark/jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ end

function jacbench_sparsemul(method)
suite = BenchmarkGroup()
for n in [50], p in [0.01, 0.05, 0.1, 0.25], depth in [5]
for n in [50], p in [0.01, 0.25], depth in [5]
x = rand(n)
f = IteratedSparseMul(; n, p, depth)
suite["(n=$n, p=$p, depth=$depth)"] = @benchmarkable jacobian_sparsity(
Expand All @@ -53,7 +53,7 @@ include("../test/definitions/brusselator_definition.jl")

function jacbench_brusselator(method)
suite = BenchmarkGroup()
for N in (6, 24, 100)
for N in (6, 24)
f! = Brusselator!(N)
x = rand(N, N, 2)
y = similar(x)
Expand Down

0 comments on commit 64d90f3

Please sign in to comment.