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
functionsumvector(A, n)
s =zero(eltype(A)) +zero(eltype(A))
nrows =size(A, 1)
ncols =size(A, 2)
r =rand(1:nrows, 5)
for k =1:n
for i =1:ncols
val = Base.unsafe_getindex(A, r, i)
s +=first(val)
endend
s
end
In JuliaLang#13612 I converted checksize from a generated function to a recursive lispy definition, but the methods are too complicated to be automatically inlined. Manually adding the inline annotation fixes this performance regression JuliaLang#14594. Master is now faster than 0.4.0 on most of the array perf tests.
I looked at https://github.com/jrevels/BaseBenchmarkReports/blob/master/c70ab26/c70ab26_vs_adffe19.md which is a test benchmark run that @jrevels ran that compares 0.4.2 with master. There are multiple regressions and I believe that most of them are from changes to
unsafe_getindex
, and more specifically,_checksize
For example, the benchmark:
Benchmark with
A = rand(300, 500)
.Master:
0.4.2:
Profiling shows that the extra time is spend in
_checksize
atjulia/base/multidimensional.jl
Line 259 in 128e546
CC: @mbauman since it was last touched in the scalar dimension drop change.
The text was updated successfully, but these errors were encountered: