Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize istriu/istril to accept a band index #590

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

jishnub
Copy link
Collaborator

@jishnub jishnub commented Dec 4, 2024

Currently, only istriu(S) and istril(S) are specialized for sparse matrices, and this PR generalizes these to accept the band index k. This improves performance:

julia> S = sparse(1:4000, 1:4000, 1:4000);

julia> @btime istriu($S, -1);
  20.941 ms (0 allocations: 0 bytes) # main
  5.660 μs (0 allocations: 0 bytes) # this PR

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.07%. Comparing base (780c4de) to head (598da1f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #590   +/-   ##
=======================================
  Coverage   84.07%   84.07%           
=======================================
  Files          12       12           
  Lines        9188     9188           
=======================================
  Hits         7725     7725           
  Misses       1463     1463           

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

Copy link
Member

@dkarrasch dkarrasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jishnub jishnub merged commit 4fd3aad into main Dec 5, 2024
10 checks passed
@jishnub jishnub deleted the jishnub/istriul branch December 5, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants