Skip to content

Commit 264b8db

Browse files
committed
fixup! Specialize function args to avoid allocations
1 parent cdb3cb4 commit 264b8db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/reduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ function mapreduce_pairwise(f::F, op::G, A::AbstractArrayOrBroadcasted, init) wh
486486
n <= pairwise_blocksize(f, op) && return mapreduce_kernel(f, op, A, init, eachindex(A))
487487
return mapreduce_pairwise(f, op, A, init, eachindex(A))
488488
end
489-
mapreduce_pairwise(f::F, op::G, itr, init) where {F, G} = mapreduce_pairwise(f, op, itr, init, IteratorSize(itr))
489+
mapreduce_pairwise(f::F, op::G, itr, init) where {F, G} = mapreduce_pairwise(f, op, itr, init, IteratorSize(itr))
490490
function mapreduce_pairwise(f, op, itr, init, S::Union{HasLength, HasShape})
491491
n = length(itr)
492492
n == 0 && return _mapreduce_start(f, op, itr, init)

0 commit comments

Comments
 (0)