FillArrays.jl icon indicating copy to clipboard operation
FillArrays.jl copied to clipboard

Specialize isbanded for OneElement

Open jishnub opened this issue 2 years ago • 2 comments

This allows O(1) checks for the bandedness of a OneElement.

julia> A = OneElement(3, (20,20), (20,20));

julia> @btime isdiag($A);
  542.590 ns (0 allocations: 0 bytes) # master
  3.382 ns (0 allocations: 0 bytes) # PR

jishnub avatar Dec 22 '23 13:12 jishnub

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c7c34aa) 99.89% compared to head (c583040) 99.89%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #333   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files           8        8           
  Lines         920      922    +2     
=======================================
+ Hits          919      921    +2     
  Misses          1        1           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 22 '23 13:12 codecov[bot]

seems a nice addition to have. i dont see any problems with it at first glance.

longemen3000 avatar Mar 01 '24 20:03 longemen3000