Skip to content

Commit 328dd9d

Browse files
committed
Create test_timings.jl
1 parent c5607ce commit 328dd9d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/test_timings.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using InfiniteLinearAlgebra, BandedMatrices, LazyArrays, FillArrays, BenchmarkTools, Test
2+
import LazyArrays: MemoryLayout, arguments
3+
4+
@testset "Bessel timings" begin
5+
A = BandedMatrix(0 => -2*(0:∞)/10.0, 1 => Ones(∞), -1 => Ones(∞))
6+
n = 1_000_000
7+
V = view(A.data.args[2],:,1:n)
8+
b = similar(V)
9+
@test @belapsed(copyto!(b,V)) 0.01
10+
@test @belapsed(A.data[:,1:n])  0.02
11+
@test @belapsed(A[1:n,1:n]) 0.02
12+
end
13+

0 commit comments

Comments
 (0)