Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Mar 12, 2025

Avoiding broadcasting helps with performance in certain cases:

julia> using LinearAlgebra, SparseArrays

julia> D = Diagonal(sprand(1000, 0.01));

julia> @b D lmul!(2.0, _)
88.674 ns (4 allocs: 384 bytes) # master
10.025 ns # this PR

Similar performance boosts for the other banded matrices.

@jishnub jishnub added arrays [a, r, r, a, y, s] performance Must go faster labels Mar 12, 2025
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!

@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.96%. Comparing base (8cc4216) to head (a218816).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1236      +/-   ##
==========================================
- Coverage   91.99%   91.96%   -0.04%     
==========================================
  Files          34       34              
  Lines       15480    15475       -5     
==========================================
- Hits        14241    14231      -10     
- Misses       1239     1244       +5     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dkarrasch dkarrasch merged commit 4c9e125 into master Mar 12, 2025
3 of 4 checks passed
@dkarrasch dkarrasch deleted the jishnub/lrmul branch March 12, 2025 19:12
jishnub added a commit that referenced this pull request Apr 11, 2025
This was missed out in
#1236, as the
functions may be applied to the bands here as well.
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