Skip to content

Add unordered element iterator or visitor (using closure) #58

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

Closed
bluss opened this issue Jan 16, 2016 · 1 comment
Closed

Add unordered element iterator or visitor (using closure) #58

bluss opened this issue Jan 16, 2016 · 1 comment

Comments

@bluss
Copy link
Member

bluss commented Jan 16, 2016

Like .iter(), but visits the array elements in "arbitrary" order. Will use memory order or whatever order is most efficient.

@bluss
Copy link
Member Author

bluss commented Jan 16, 2016

I'll add that unfortunately by how llvm optimizes, it doesn't seem to be possible to do our very best for segmented arrays here (where one dimension is contiguous, but the whole array is not).

If we write what amounts to a "nested" loop using usual rust external iterators, we need to rely on llvm to recognize it as a nested loop, but this seems to never happen. As you can see, current zip_with_mut uses explicit nested for loops, and at the moment, this does not seem possible to replicate with iterators in any way. Also discussed for the simpler case of a deque in issue rust-lang/rust/issues/30805

@bluss bluss changed the title Add unordered element iterator Add unordered element iterator or visitor (closure) Jan 20, 2016
@bluss bluss changed the title Add unordered element iterator or visitor (closure) Add unordered element iterator or visitor (using closure) Jan 20, 2016
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

No branches or pull requests

1 participant