Commit dcf579c
authored
Multiplication instead of division in triangular eigen test (#1295)
This makes the operation simpler to compile, and reduces TTFX.
```julia
julia> using LinearAlgebra
julia> A1 = UpperTriangular([1 2; 3 4])
2×2 UpperTriangular{Int64, Matrix{Int64}}:
1 2
⋅ 4
julia> vals, vecs = eigen(A1);
julia> @time vecs * diagm(0 => vals) / vecs ≈ A1;
1.858678 seconds (4.22 M allocations: 214.301 MiB, 8.50% gc time, 99.97% compilation time)
julia> @time vecs * Diagonal(vals) ≈ A1 * vecs;
0.645123 seconds (1.25 M allocations: 62.933 MiB, 17.30% gc time, 99.97% compilation time)
```1 parent 07725da commit dcf579c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
0 commit comments