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
Iterator of ndarray
has poor performance than Iterator of slice
#500
Comments
Thanks for reporting this. Out of curiosity, how does the I haven't taken a look at the assembly, but I have a guess why [patch.crates-io]
ndarray = { git = "https://github.com/jturner314/ndarray.git", branch = "iter-nth" } By the way, I recommend |
A safe for loop is as good as on a slice? This sounds good. Can you point out which code is running for that slow ndarray_iter benchmark? If it's the iterator that I suspect, with |
I suspect that this is fixed by #614. |
I repeated the benchmark using the current master:
The situation seems to have improved significantly (most likely thanks to #614) - should we close this? |
Nice! |
I've made a simple performance test
i7-4790 3.60GHz
+Windows 10 17763
+rustc 1.31.0-nightly (2bd5993ca 2018-10-02) x86_64-pc-windows-msvc
i7-4790 3.60GHz
+Windows 10 17763
+rustc 1.31.0-nightly (2bd5993ca 2018-10-02) x86_64-pc-windows-msvc
+Thin LTO
Iterate over a
ArrayView
is incredible slow than slice.But
for loop
onArrayView
as fast as toget_unchecked
onslice
.Maybe a bug?
The text was updated successfully, but these errors were encountered: