Closed goretkin closed 6 years ago
FemtoClearner will do even more if we bump the requirement to Julia 0.6. I can see that tests are failing on 0.5 so this might not be valid on 0.5. I think we should just bump the requirements.
Should have pinged you. I looked into the ambiguities in #56
I just saw. Perfect! I wasn't sure what I was doing anyway ;)
Personally I think it's a good idea to drop 0.5.0 and use 0.6.0. Not sure who else is using this package. I'm just trying to get zero-allocation views, which will hopefully be in the next Julia release anyway.
How can femtobot be triggered to handle the 0.6.0 deprecations?
I'm just trying to get zero-allocation views, which will hopefully be in the next Julia release anyway.
I'm not so sure about that. @yuyichao Have you been doing any work on this?
I guess you need to define "zero-allocation"....
zero allocation for inline and inbounds subarrays is handled by https://github.com/JuliaLang/julia/pull/23240
zero allocation for inlined but not inbounds subarrays is the next target. The currently on-going series of llvm optimization related PRs are preparation for it. There's a high chance it works only on LLVM 5.0 though.
The next target would be to duplicate the llvm pass to type inference as well using the llvm pass as a template and to help figure out how to redo the IR for optimization in the type inference.
zero allocation for non-inlined inbounds subarray is a completely different matter since it requires collecting escape info in type inference correctly.
2 can partially replace 1, and 3 will be a strict superset of 1.
1 or 2 should be doable for the next release. 3 and 4 are not necessarily harder given 2 but both of them are fairly big projects.
Thanks @yuyichao . Could you clarify what "inline" means? Does sum(@view A[:,1])
count?
sum(@view A[:,1])
Doesn't matter. You just need all the user to be inlined.
What do you mean "doesn't matter"? Could you give an example of an inline usage and a not inline usage?
It means that the code contains no information to determine if the fun that uses the subarray is inlined or not.
I'm sorry, but I'm not following. I know what @inline
does for function definitions and @inbounds
does for array indexing. Are you talking about either of those?
Inbounds is just the macro, yes. But inlining does not require the macro. As long as the function is inlined it is, well, inlined.....
https://github.com/JuliaArrays/ArrayViews.jl/pull/50 didn't catch these