Skip to content

Commit 88227c3

Browse files
committed
Increase benchmark time and add setup [ci skip]
1 parent a56afbb commit 88227c3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

perf/lu.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using BenchmarkTools
22
using LinearAlgebra, RecursiveFactorization
33

4-
BenchmarkTools.DEFAULT_PARAMETERS.seconds = 0.08
4+
BenchmarkTools.DEFAULT_PARAMETERS.seconds = 0.5
55

66
function luflop(m, n=m; innerflop=2)
77
sum(1:min(m, n)) do k
@@ -22,14 +22,14 @@ ref_mflops = Float64[]
2222
ns = 4:8:500
2323
for n in ns
2424
@info "$n × $n"
25-
A = rand(n, n)
26-
bt = @belapsed LinearAlgebra.lu!($(copy(A)))
25+
global A = rand(n, n)
26+
bt = @belapsed LinearAlgebra.lu!(B) setup=(B = copy(A))
2727
push!(bas_mflops, luflop(n)/bt/1e9)
2828

29-
rt = @belapsed RecursiveFactorization.lu!($(copy(A)))
29+
rt = @belapsed RecursiveFactorization.lu!(B) setup=(B = copy(A))
3030
push!(rec_mflops, luflop(n)/rt/1e9)
3131

32-
ref = @belapsed LinearAlgebra.generic_lufact!($(copy(A)))
32+
ref = @belapsed LinearAlgebra.generic_lufact!(B) setup=(B = copy(A))
3333
push!(ref_mflops, luflop(n)/ref/1e9)
3434
end
3535

0 commit comments

Comments
 (0)