You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loop over diagind in diag for banded matrices (#1211)
This improves performance in obtaining the zero bands for banded
matrices. This is mainly because of `@inbounds` annotations.
Using
```julia
D = Diagonal(1:6000);
B = Bidiagonal(1:6000, 1:5999, :U);
```
| Operation | master | PR |
| -------- | ------- | ------- |
|`@btime diag($D, 2);` |2.832 μs |1.925 μs |
|`@btime diag($B, 2);` |2.283 μs |1.937 μs |
The performance difference in `Tridiagonal` and `SymTridiagonal` seems
pretty negligible, for reasons that I don't fully understand. Perhaps
the indexing is a more complicated operation for these, so that the
bounds-checking isn't the dominant contributor.
0 commit comments