-
-
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
RFC: Improved implementation of SubArray #3503
Conversation
It is just in the status of initial setup. I appreciate your feedback as this work proceeds. |
I agree with allowing I am going to first work on the main functionality. It is easy to add bound checking afterwards, when the main interface stabilize. |
There is a potential safety issue here: Consider the code below: a = rand(100)
s = sub(a, 1:10)
push!(a, 2.0)
x = s[1] # this can be dangerous, as the base address of a may have been changed during push! Even when though |
I suspect that we don't have to cache the pointer for performance when Jeff's optimization work is ready. |
@JeffBezanson Do you think it is ok to go ahead with this approach for now, to improve SubArray indexing? @lindahua Why not use ArrayView instead of MultiDimView as a name? This will also give a fast implementation for #3701 and help move towards the new design. |
@ViralBShah, I think we still need some additional technology. See #1917 (comment) |
@StefanKarpinski What do we do here, given the new work on array views? |
I suggest we should close this and focus our attention on views. |
While this PR implements views, what I mean is to focus on getting our indexing operations to return views rather than copies, and work on making that really fast. |
I've been working on some fast linear indexing for multidimensional array views. Should have something to share soon. |
Close. My latest efforts are at #5513. |
Based on the discussion in #3496