JuliaLinearAlgebra / ArnoldiMethod.jl

The Arnoldi Method with Krylov-Schur restart, natively in Julia.

Home Page:https://julialinearalgebra.github.io/ArnoldiMethod.jl/dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type instabilities

haampie opened this issue · comments

The current implementation feels slow, probably just because of type instabilities:

> A = sprand(10_000, 10_000, 10 / 10_000) + 3I
> @code_warntype IRAM.restarted_arnoldi(A, 5, 30, 3, 0.00001, 200);
Variables:
  #self# <optimized out>
  A::SparseMatrixCSC{Float64,Int64}
  min::Int64
  max::Int64
  converged::Int64
  ε::Float64
  max_restarts::Int64
  restarts <optimized out>
  new_active::Any
  H22::Any
  schur_form::Tuple{Union{AbstractArray{T,2} where T, Array{T,1} where T},Union{AbstractArray{T,2} where T, Array{T,1} where T},Union{AbstractArray{T,2} where T, Array{T,1} where T}}
  V_locked::Any
  H_right::Any
  H_above::Any
  value <optimized out>
  #temp#@_16::Int64
  n::Int64
  arnoldi::IRAM.Arnoldi{Float64}
  h::Array{Float64,1}
  min′::Int64
  active::Any
  V_new::Array{Float64,2}
  V_prealloc::Array{Float64,2}
  #temp#@_24::Int64
  J@_25 <optimized out>
  #temp#@_26 <optimized out>
  J@_27::Any
  #temp#@_28 <optimized out>
  #temp#@_29 <optimized out>
  J@_30::Tuple
  J@_31::Tuple
  J@_32::Any
  #temp#@_33 <optimized out>
  #temp#@_34 <optimized out>
  #temp#@_35 <optimized out>
  #temp#@_36 <optimized out>
  J@_37::Any
  #temp#@_38 <optimized out>
  #temp#@_39 <optimized out>