-
Notifications
You must be signed in to change notification settings - Fork 9
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
performance on 0.6, reinterpret
and safety
#6
Comments
FWIW I agree with your decision to choose former (unsafe) implementation on 0.6 and use reinterpret on views starting with 0.7 |
Thanks, I value that feedback quite a lot because I was initially feeling quite unsure about it. As I've done a little more research I think it's pretty clear that this is the only option. We already have problems with |
Back to pointers as default. We use the All |
Note to revisit this after Julia 1.0.1 thanks to Keno's fix. |
To achieve full memory safety requires extensive use of
reinterpret
. On 0.6, it is impossible toreinterpret
only a subset of an array. This causes Arrow.jl to always make an unnecessary copy, i.e. roughly what happens isreinterpret(T, A[i:j])
. Since theA[i:j]
can't be a view, it must be allocated. Therefore, we only get good performance in cases where the entire underlying dataA
is reinterpreted, i.e. no real cases.There is no solution to this in 0.6. In 0.7, it will be possible to
reinterpret
views, and at that time we will have to investigate the performance ofreinterpret
.So, my decision is to sacrifice safety and go back to pointers until 0.7.
The text was updated successfully, but these errors were encountered: