You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some IFAs such as (rr2, rr, normal) cause allocations.
Strangely, window_hamming doesn't.
using IndexFunArrays
functionmain_bug(; N=4096)
els =rr2(Int, (N, N))
s =zero(eltype(els))
for e in els
if e >100
s +=1endendreturn s
end#
julia>@timemain_bug(; N=1000)
0.061883 seconds (3.00 M allocations:106.787 MiB, 22.70% gc time)
collecting fixes it, so it is related to IndexFunArrays.
using IndexFunArrays
functionmain_bug(; N=4096)
els =collect(rr2(Int, (N, N)))
s =zero(eltype(els))
for e in els
if e >100
s +=1endendreturn s
end#
julia>@timemain_bug(; N=1000)
0.007953 seconds (7 allocations:7.630 MiB, 84.24% gc time)
The text was updated successfully, but these errors were encountered:
Some IFAs such as (
rr2
,rr
,normal
) cause allocations.Strangely,
window_hamming
doesn't.collecting fixes it, so it is related to IndexFunArrays.
The text was updated successfully, but these errors were encountered: