From 29215fa5d7c8d82c5d8d19cb3cb7fafc9ef34324 Mon Sep 17 00:00:00 2001 From: Dhairya Gandhi Date: Wed, 29 Apr 2020 16:17:44 +0530 Subject: [PATCH] comment on possible future deprecations --- src/zeros.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zeros.jl b/src/zeros.jl index d281d3eb..d31adcd9 100644 --- a/src/zeros.jl +++ b/src/zeros.jl @@ -94,6 +94,9 @@ for op in (:+, :-, :*) end # Some opportunities to avoid scalar indexing, intermediaries +# Since it replicates a little of what we expect Base to do, +# it should be possible to remove in the future, but for now, +# these help with performance. broadcasted(::typeof(+), a::AbstractArray, b::Zeros{T,0}) where T = a broadcasted(::typeof(+), a::Zeros{T,0}, b::AbstractArray) where T = b broadcasted(::typeof(-), a::AbstractArray, b::Zeros{T,0}) where T = a