From 64d90f38a2d12f87d36e4de455ab26adfd7bdd76 Mon Sep 17 00:00:00 2001 From: Adrian Hill Date: Tue, 18 Jun 2024 16:29:56 +0200 Subject: [PATCH] Slim down benchmark suite (#127) --- benchmark/hessian.jl | 28 ++++++++++++++++------------ benchmark/jacobian.jl | 4 ++-- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/benchmark/hessian.jl b/benchmark/hessian.jl index 58722077..6ab77277 100644 --- a/benchmark/hessian.jl +++ b/benchmark/hessian.jl @@ -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) @@ -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) diff --git a/benchmark/jacobian.jl b/benchmark/jacobian.jl index 435a9d86..3669c623 100644 --- a/benchmark/jacobian.jl +++ b/benchmark/jacobian.jl @@ -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( @@ -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)