GenericSchur.jl icon indicating copy to clipboard operation
GenericSchur.jl copied to clipboard

Usage of vector with abstract eltype

Open dkarrasch opened this issue 3 years ago • 1 comments
trafficstars

This came up in a nanosoldier run. I noticed that in this line, a vector is allocated whose eltype is abstract, since there is no eltype to Givens:

https://github.com/RalphAS/GenericSchur.jl/blob/48bff3566cbbe923742ef7bb249ffd739117cd2e/src/symtridiag.jl#L74

In every subsequent setindex!, this calls a convert routine (which does nothing I guess), but in case it's possible, it may be beneficial to precompute the correct eltype and set it upfront?

dkarrasch avatar Aug 02 '22 15:08 dkarrasch

Thanks, I'll put that in the next patch.

RalphAS avatar Aug 04 '22 15:08 RalphAS