Skip to content

zip_mut_with 'f' order#754

Merged
jturner314 merged 3 commits into
rust-ndarray:masterfrom
nilgoyette:zip_mut_with
Jan 21, 2020
Merged

zip_mut_with 'f' order#754
jturner314 merged 3 commits into
rust-ndarray:masterfrom
nilgoyette:zip_mut_with

Conversation

@nilgoyette
Copy link
Copy Markdown
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.

Comment thread src/impl_methods.rs Outdated
Copy link
Copy Markdown
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
Copy Markdown
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