Skip to content

Commit 2ae11f0

Browse files
committed
faster growth of data
1 parent 328dd9d commit 2ae11f0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/infqr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ end
123123

124124

125125
function lmul!(adjA::Adjoint{<:Any,<:QRPackedQ{<:Any,<:AdaptiveQRFactors}}, B::CachedVector{T,Vector{T},<:Zeros{T,1}}) where T
126-
COLGROWTH = 100 # rate to grow columns
126+
COLGROWTH = 1000 # rate to grow columns
127127
tol = floatmin(T)
128128

129129
require_one_based_indexing(B)

test/test_timings.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
using InfiniteLinearAlgebra, BandedMatrices, LazyArrays, FillArrays, BenchmarkTools, Test
2-
import LazyArrays: MemoryLayout, arguments
2+
import LazyArrays: MemoryLayout, arguments, resizedata!, partialqr!
33

44
@testset "Bessel timings" begin
5-
A = BandedMatrix(0 => -2*(0:∞)/10.0, 1 => Ones(∞), -1 => Ones(∞))
5+
A = BandedMatrix(0 => -2*(0:∞)/1_000_000.0, 1 => Ones(∞), -1 => Ones(∞))
66
n = 1_000_000
77
V = view(A.data.args[2],:,1:n)
88
b = similar(V)
99
@test @belapsed(copyto!(b,V)) 0.01
1010
@test @belapsed(A.data[:,1:n])  0.02
1111
@test @belapsed(A[1:n,1:n]) 0.02
12+
13+
C = cache(A); @time resizedata!(C, n+1,n);
14+
s = 1000; C = cache(A); @time for m = s:s:1_000_000 resizedata!(C, m,m); end;
15+
s = 1000; F = qr(A); @time for m = s:s:1_000_000 partialqr!(F.factors.data,m); end;
16+
@time A \ Vcat([1.0],Zeros(∞));
1217
end
1318

0 commit comments

Comments
 (0)