Skip to content

Commit

Permalink
Use length of arrays directly in conv
Browse files Browse the repository at this point in the history
This may save an unnecessary call to `prod`
  • Loading branch information
jishnub authored Dec 16, 2022
1 parent e449411 commit ba0586f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dspbase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ function conv(u::AbstractArray{T, N},
v::AbstractArray{T, N}) where {T<:RealOrComplexFloat, N}
su = size(u)
sv = size(v)
if prod(su) >= prod(sv)
if length(u) >= length(v)
_conv(u, v, su, sv)
else
_conv(v, u, sv, su)
Expand Down

0 comments on commit ba0586f

Please sign in to comment.