Hey, since it’s not a bug specifically but a performance issue I post it here instead on Github.
In the attempt of generating random positive definite matrices I realized there was a huge performance issue with the QRCompactWYQ
type, here is an example:
using BenchmarksTools, LinearAlgebra
A = Diagonal(exp.(rand(100)) # Vector of eigenvalues
B, _ = qr(rand(100, 100)) # We obtain a unitary matrix
C = Matrix(B) # For comparison
@btime Symmetric($B * $A * $(B)')
## 149.708 ms (30008 allocations: 25.86 MiB)
@btime Symmetric($C * $A * $(C)')
## 71.447 μs (6 allocations: 156.50 KiB)
Which is a 2000x speedup…