Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Jan 1, 2026

This follows the convention in LinearAlgebra and only evaluates A * b * alpha in mul! if alpha is non-zero.

Also, this improves performance when b is all zeros:

julia> using LinearAlgebra, FillArrays

julia> A = rand(100, 100);

julia> v = Zeros(100);

julia> y = similar(A, size(A,1));

julia> @btime mul!($y, $A, $v);
  1.437 μs (0 allocations: 0 bytes) # master
  14.799 ns (0 allocations: 0 bytes) # this PR

@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.22%. Comparing base (0a58cd8) to head (193520f).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/fillalgebra.jl 75.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #426       +/-   ##
===========================================
+ Coverage    0.00%   99.22%   +99.22%     
===========================================
  Files           8        8               
  Lines        1152     1168       +16     
===========================================
+ Hits            0     1159     +1159     
+ Misses       1152        9     -1143     

☔ 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.

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