Skip to content
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

Fix setindex to work for more index types. #71

Merged
merged 1 commit into from
Jun 3, 2016
Merged

Conversation

andreasnoack
Copy link
Member

These were falling back on the implementation in abstractarray.jl for Colon so for this small example

julia> A = DistributedArrays.drandn(200,200);

julia> B = A[51:150,51:150];

julia> C = Array(Float64,100,100);

julia> @time C[:] = B;
  0.004728 seconds (5.18 k allocations: 294.531 KB)

I can see ~2000x speedup.

@codecov-io
Copy link

codecov-io commented Jun 2, 2016

Current coverage is 70.12%

Merging #71 into master will increase coverage by <.01%

@@             master        #71   diff @@
==========================================
  Files             1          1          
  Lines           572        569     -3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits            401        399     -2   
+ Misses          171        170     -1   
  Partials          0          0          

Powered by Codecov. Last updated by 0215b9d...6d78da1

@coveralls
Copy link

coveralls commented Jun 2, 2016

Coverage Status

Coverage increased (+0.02%) to 70.123% when pulling 997895d on anj/setindex into 0215b9d on master.

@andreasnoack
Copy link
Member Author

I should add here that it would be great to know to what extend the methods here fall back to the AbstractArray methods. It's quite disastrous when it happens because, unfortunately, many of the methods for AbstractArray fetch elements one at a time. At the same time, it can be tricky to detect. One solution is to debug this by removing the subtype relation between DArrays and AbstractArray and see if any of the tests fail.

@andreasnoack andreasnoack merged commit ec9ab98 into master Jun 3, 2016
@andreasnoack andreasnoack deleted the anj/setindex branch June 3, 2016 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants