Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Feb 18, 2025

This improves performance in obtaining the zero bands for banded matrices. This is mainly because of @inbounds annotations.

Using

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.

@jishnub jishnub added performance Must go faster arrays [a, r, r, a, y, s] labels Feb 18, 2025
@jishnub jishnub force-pushed the jishnub/diag_diagonal branch from 5f9de86 to 5de9d05 Compare February 18, 2025 12:18
@codecov
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.89%. Comparing base (b464203) to head (5de9d05).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1211   +/-   ##
=======================================
  Coverage   91.88%   91.89%           
=======================================
  Files          34       34           
  Lines       15374    15378    +4     
=======================================
+ Hits        14127    14131    +4     
  Misses       1247     1247           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jishnub jishnub merged commit c234bed into master Feb 19, 2025
4 checks passed
@jishnub jishnub deleted the jishnub/diag_diagonal branch February 19, 2025 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrays [a, r, r, a, y, s] performance Must go faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants