-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setindex! no longer inlined for rank N>6 #9622
Comments
For |
Dupe of #5393. Jeff closed that, but I'm not sure it's redundant with anything else, so perhaps we should leave this open. As @simonster said there,
|
I thought I had seen something like this before, but couldn't find it. Thanks. Ok then, I hope you agree that we should at least change indexing with |
Although with the |
I certainly support doing something (whatever seems best) to make this fast. |
Hm, this got worse after #10525. Inlining now stops for rank N>4. I'll try to look into this one a bit more. |
Ah, found it. We're still one-worse than we were since I dispatch to an internal function that has one more argument (to specify the |
Helps #9622; getindex is now inlined up to N=6 and setindex! up to N=5. Any higher dimensions are limited by MAX_TUPLETYPE_LEN.
I encountered this issue. If it's hard to solve now, a warning would be nice - it was hard to pinpoint the source of the problem in my code. |
This seems fixed now, julia> code_typed(f10,(Array{Float64,10},))
1-element Array{Any,1}:
CodeInfo(:(begin
(Base.arrayset)(A,(Core.typeassert)(1.0,Float64)::Float64,1,1,1,1,1,1,1,1,1,1)::Array{Float64,10}
return 1.0
end))=>Float64 Please repoen if this is still a problem. |
I just noticed this today on latest master (Version 0.4.0-dev+2498), I guess this must be regression?
returns
versus
Consequently, indexing into an array of rank>6 becomes slow. Indexing with a
CartesianIndex
could be fixed by letting thestagedfunction
generate thearrayset
call automatically, but I guess this also needs to be fixed for normal indexing?The text was updated successfully, but these errors were encountered: