Skip to content

Commit

Permalink
Update broadcast.jl
Browse files Browse the repository at this point in the history
move `@inbounds` outside the loop body. see #38086
  • Loading branch information
N5N3 committed Nov 22, 2021
1 parent ae247b4 commit 86a627a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -973,14 +973,14 @@ end
destc = dest.chunks
cind = 1
bc′ = preprocess(dest, bc)
for P in Iterators.partition(eachindex(bc′), bitcache_size)
@inbounds for P in Iterators.partition(eachindex(bc′), bitcache_size)
ind = 1
@simd for I in P
@inbounds tmp[ind] = bc′[I]
tmp[ind] = bc′[I]
ind += 1
end
@simd for i in ind:bitcache_size
@inbounds tmp[i] = false
tmp[i] = false
end
dumpbitcache(destc, cind, tmp)
cind += bitcache_chunks
Expand Down

0 comments on commit 86a627a

Please sign in to comment.