JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.46k stars 5.46k forks source link

slow Schur factorization for Hermitian matrices #35054

Closed stevengj closed 4 years ago

stevengj commented 4 years ago

For a Hermitian matrix, Schur factorization is equivalent to the eigenvalue decomposition, but it seems to be much slower:

julia> A = rand(1000,1000); H = Symmetric(A);

julia> @btime eigen($H);
  141.423 ms (15 allocations: 23.25 MiB)

julia> @btime schur($H);
  502.031 ms (13 allocations: 23.16 MiB)

Seems like we just need some specialized methods for schur?

andreasnoack commented 4 years ago

Yes. Currently, schur will dispatch to the method for general matrices whereas eigen will use a symmetric solver.

stevengj commented 4 years ago

Should be pretty trivial to implement a specialized method here, so marking as a good first issue.