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

zip_mut_with 'f' order #754

Merged
merged 3 commits into from
Jan 21, 2020
Merged

Conversation

nilgoyette
Copy link
Collaborator

As adviced by @jturner314 in #749, I now use as_slice_memory_order in zip_mut_with_same_shape for same-order arrays. (I also wanted to optimize zip_indexed but it's more complex so I'll probably do it later)

I modified zip_mut_with_same_shape more than I intended at first because there were some useless statements. At that point, we have same-shape arrays, so they have the same length, which make the slicing useless.

The bench I added show that 'cc' is not slower than it was and 'ff' is as fast as 'cc'. On windows and WSL.

src/impl_methods.rs Outdated Show resolved Hide resolved
Copy link
Member

@jturner314 jturner314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good to me. The CI failure should be resolved by #762.

@jturner314 jturner314 merged commit c20458a into rust-ndarray:master Jan 21, 2020
@jturner314
Copy link
Member

I re-ran CI and it passed now that #762 resolved the clippy warnings. Thanks for this PR @nilgoyette! It's always nice to boost performance with internal improvements like this.

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.

2 participants