I’m not sure if this has already been observed by someone, but I searched and didn’t find anything. The performance of fill
is very slow in 0.7 in comparison to 0.6.2 or an explicit loop. The following results are from 0.7 installed today:
julia> @btime fill(0.0,5,5)
814.123 ns (2 allocations: 368 bytes)
5×5 Array{Float64,2}:
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
and the results in 0.6.2:
julia> @btime fill(0.0,5,5)
33.100 ns (1 allocation: 336 bytes)
5×5 Array{Float64,2}:
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
Any thoughts?